File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 1- Import-Module PSScriptAnalyzer
1+ $directory = Split-Path - Parent $MyInvocation.MyCommand.Path
2+ $testRootDirectory = Split-Path - Parent $directory
3+
4+ Import-Module PSScriptAnalyzer
5+ Import-Module (Join-Path $testRootDirectory " PSScriptAnalyzerTestHelper.psm1" )
6+
27$ruleConfiguration = @ {
38 Enable = $true
49 NoEmptyLineBefore = $true
@@ -132,6 +137,23 @@ if (Test-Path "blah") {
132137
133138 It " Should find two violations" {
134139 $violations.Count | Should Be 2
140+ $params = @ {
141+ RawContent = $def
142+ DiagnosticRecord = $violations [0 ]
143+ CorrectionsCount = 1
144+ ViolationText = ' }'
145+ CorrectionText = ' }' + [System.Environment ]::NewLine
146+ }
147+ Test-CorrectionExtentFromContent @params
148+
149+ $params = @ {
150+ RawContent = $def
151+ DiagnosticRecord = $violations [1 ]
152+ CorrectionsCount = 1
153+ ViolationText = ' }'
154+ CorrectionText = ' }' + [System.Environment ]::NewLine
155+ }
156+ Test-CorrectionExtentFromContent @params
135157 }
136158 }
137159}
You can’t perform that action at this time.
0 commit comments