File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -196,24 +196,20 @@ Describe "Test importing correct customized rules" {
196
196
$customizedRulePath.Count | Should Be 1
197
197
}
198
198
199
- if ($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' )
200
- {
201
- It " loads custom rules that contain version in their path" {
199
+ It " loads custom rules that contain version in their path" - Skip:($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' ) {
202
200
$customizedRulePath = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomRulePath $directory \VersionedSampleRule\SampleRuleWithVersion
203
201
$customizedRulePath.Count | Should Be 1
204
202
205
203
$customizedRulePath = Get-ScriptAnalyzerRule - CustomRulePath $directory \VersionedSampleRule\SampleRuleWithVersion
206
204
$customizedRulePath.Count | Should Be 1
207
205
}
208
206
209
- It " loads custom rules that contain version in their path with the RecurseCustomRule switch" {
207
+ It " loads custom rules that contain version in their path with the RecurseCustomRule switch" - Skip:( $PSVersionTable .PSVersion -lt [ Version ] ' 5.0.0 ' ) {
210
208
$customizedRulePath = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomRulePath $directory \VersionedSampleRule - RecurseCustomRulePath
211
209
$customizedRulePath.Count | Should Be 1
212
210
213
211
$customizedRulePath = Get-ScriptAnalyzerRule - CustomRulePath $directory \VersionedSampleRule - RecurseCustomRulePath
214
212
$customizedRulePath.Count | Should Be 1
215
-
216
- }
217
213
}
218
214
}
219
215
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ function SuppressPwdParam()
103
103
}
104
104
105
105
Context " Rule suppression within DSC Configuration definition" {
106
- It " Suppresses rule" - skip:((Test-PSEditionCoreCLRLinux ) -or ($PSVersionTable.PSVersion -ge [Version ]' 5.0.0' )) {
106
+ It " Suppresses rule" - skip:((Test-PSEditionCoreCLRLinux ) -or ($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' )) {
107
107
$suppressedRule = Invoke-ScriptAnalyzer - ScriptDefinition $ruleSuppressionInConfiguration - SuppressedOnly
108
108
$suppressedRule.Count | Should Be 1
109
109
}
You can’t perform that action at this time.
0 commit comments