From 3ce65f39e0d01cc57dac04028698b3df2598819c Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 17 Jul 2023 09:32:03 -0700 Subject: [PATCH] Hide expected error for negative test on windows for script extension (#19929) --- test/powershell/Host/ConsoleHost.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1 index e821df9b4..0ca897835 100644 --- a/test/powershell/Host/ConsoleHost.Tests.ps1 +++ b/test/powershell/Host/ConsoleHost.Tests.ps1 @@ -174,7 +174,7 @@ Describe "ConsoleHost unit tests" -tags "Feature" { It "-File should fail for script without .ps1 extension" -Skip:(!$IsWindows) { $Filename = 'test.xxx' Set-Content -Path $testdrive/$Filename -Value "'hello'" - & $powershell -NoProfile -File $testdrive/$Filename > $null + & $powershell -NoProfile -File $testdrive/$Filename 2>&1 $null $LASTEXITCODE | Should -Be 64 }