Fix test failing when UnixStat
feature is disabled (#11370)
This commit is contained in:
parent
1f9c3c2abd
commit
ed27f36223
|
@ -15,7 +15,9 @@ Describe "Get-FormatData" -Tags "CI" {
|
|||
$format.TypeNames | Should -HaveCount 2
|
||||
$format.TypeNames[0] | Should -BeExactly "System.IO.DirectoryInfo"
|
||||
$format.TypeNames[1] | Should -BeExactly "System.IO.FileInfo"
|
||||
$format.FormatViewDefinition | Should -HaveCount ($IsWindows ? 4 : 5)
|
||||
|
||||
$isUnixStatEnabled = $EnabledExperimentalFeatures -contains 'PSUnixFileStat'
|
||||
$format.FormatViewDefinition | Should -HaveCount ( $isUnixStatEnabled ? 5 : 4)
|
||||
}
|
||||
|
||||
It "Should return nothing for format data requiring '-PowerShellVersion 5.1' and not provided" {
|
||||
|
|
|
@ -18,7 +18,8 @@ Describe "Built-in type information tests" -Tag "CI" {
|
|||
}
|
||||
|
||||
It "Should have correct number of built-in type items in type table" {
|
||||
$types.Count | Should -BeExactly ($IsWindows ? 273 : 272)
|
||||
$isUnixStatEnabled = $EnabledExperimentalFeatures -contains 'PSUnixFileStat'
|
||||
$types.Count | Should -BeExactly ($isUnixStatEnabled ? 272 : 273)
|
||||
}
|
||||
|
||||
It "Should have expected member info for 'System.Diagnostics.ProcessModule'" {
|
||||
|
|
Loading…
Reference in a new issue