mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Hide expected error for negative test on windows for script extension (#19929)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user