mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix use of Start-Process http://bing.com (#9793)
This commit is contained in:
@@ -207,8 +207,12 @@ Describe "Command Discovery tests" -Tags "CI" {
|
||||
}
|
||||
|
||||
Context "error cases" {
|
||||
It 'Get-Command "less `"-PsPage %db?B of %DoesNotExist:`"" should throw Drive not found' {
|
||||
{Get-Command -Name "less `"-PsPage %db?B of %DoesNotExist:`""} | Should -Throw -ErrorId 'DriveNotFound' -Because "The drive 'DoesNotExist:' should not exist"
|
||||
It 'Get-Command "less `"-PsPage %db?B of %DoesNotExist:`"" should return nothing' {
|
||||
Get-Command -Name "less `"-PsPage %db?B of %DoesNotExist:`"" | Should -BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Should return command not found for commands in the global scope" {
|
||||
{Get-Command -Name 'global:help' -ErrorAction Stop} | Should -Throw -ErrorId 'CommandNotFoundException'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user