diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 index dfd1eeb5223c8..639acb9dae646 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 @@ -792,10 +792,10 @@ A Name B } } - It "-RepeatHeader should output the header at every screen full" -Skip:([Console]::BufferHeight -eq 0) { + It "-RepeatHeader should output the header at every screen full" -Skip:([Console]::WindowHeight -eq 0) { $numObjects = 250 - $out = 1..$numObjects | ForEach-Object { @{foo=$_} } | Format-Table -RepeatHeaderPerScreen | Out-String + $out = 1..$numObjects | ForEach-Object { @{foo=$_} } | Format-Table -RepeatHeader | Out-String $lines = $out.Split([System.Environment]::NewLine) - ($lines | Select-String "Name\s*Value").Count | Should -Be ([int]($numObjects / [Console]::BufferHeight) + 1) + ($lines | Select-String "Name\s*Value").Count | Should -Be ([int]($numObjects / [Console]::WindowHeight) + 1) } }