Stop ongoing progress-bar in Write-Progress test (#17880)

This commit is contained in:
Frode Flaten
2022-08-12 08:15:42 +05:00
committed by GitHub
parent 7cfcbf10a7
commit dbffa2766f
@@ -24,6 +24,8 @@ Describe "Write-Progress DRT Unit Tests" -Tags "CI" {
}
It 'Activity longer than console width works' {
{ Write-Progress -Activity ('a' * ([console]::WindowWidth + 1)) -Status ('b' * ([console]::WindowWidth + 1)) -Id 1 } | Should -Not -Throw
$activity = 'a' * ([console]::WindowWidth + 1)
{ Write-Progress -Activity $activity -Status ('b' * ([console]::WindowWidth + 1)) -Id 1 } | Should -Not -Throw
Write-Progress -Activity $activity -Id 1 -Completed
}
}