mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Add tests for powershell -? parsing
And all other accepted forms.
This commit is contained in:
1 parent
afb499d85e
commit
a529bff212
1 file changed
+12
@@ -0,0 +1,12 @@
|
||||
Describe "CoreConsoleHost unit tests" {
|
||||
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
|
||||
|
||||
Context "Command-line parsing" {
|
||||
|
||||
foreach ($x in "--help", "-help", "-h", "-?", "--he", "-hel", "--HELP", "-hEl") {
|
||||
It "Accepts '$x' as a parameter for help" {
|
||||
& $powershell -noprofile $x | ?{ $_ -match "usage: powershell" } | Should Not BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user