Add tests for powershell -? parsing

And all other accepted forms.
This commit is contained in:
Andrew Schwartzmeyer committed 2016-04-21 15:59:40 -07:00
1 parent afb499d85e
commit a529bff212
1 file changed
+12
+12
View File
@@ -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
}
}
}
}