Skip to content

Commit

Permalink
Fix test failure in PSv3/4
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmholt committed Feb 13, 2019
1 parent 8359eff commit ada7d12
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Tests/Rules/UseCompatibleSyntax.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ Describe "PSUseCompatibleSyntax" {

$diagnostics = Invoke-ScriptAnalyzer -IncludeRule PSUseCompatibleSyntax -Path "$PSScriptRoot/CompatibilityRuleAssets/IncompatibleScript.ps1" -Settings $settings

$diagnostics.Count | Should -Be 5
if ($PSVersionTable.PSVersion.Major -ge 5)
{
$expected = 5
}
else
{
$expected = 4
}

$diagnostics.Count | Should -Be $expected
}

It "Ensures there are no incompatibilities in PSSA build files" {
Expand Down

0 comments on commit ada7d12

Please sign in to comment.