File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,18 @@ function Test-Correction {
32
32
33
33
$violations = Invoke-ScriptAnalyzer - ScriptDefinition $scriptDef - Settings $settings
34
34
$violations.Count | Should Be 1
35
- $violations [0 ].SuggestedCorrections[0 ].Text | Should Be $expectedCorrection
35
+
36
+ # We split the lines because appveyor checks out files with "\n" endings
37
+ # on windows, which results in inconsistent line endings between corrections
38
+ # and result.
39
+ $resultLines = $violations [0 ].SuggestedCorrections[0 ].Text -split " \r?\n"
40
+ $expectedLines = $expectedCorrection -split " \r?\n"
41
+ $resultLines.Count | Should Be $expectedLines.Count
42
+ for ($i = 0 ; $i -lt $resultLines.Count ; $i ++ ) {
43
+ $resultLine = $resultLines [$i ]
44
+ $expectedLine = $expectedLines [$i ]
45
+ $resultLine | Should Be $expectedLine
46
+ }
36
47
}
37
48
38
49
Describe " ProvideCommentHelp" {
You can’t perform that action at this time.
0 commit comments