openssh-portable/regress/pesterTests/ShellHost.Tests.ps1
Manoj Ampalam 84e87be8ae
ConPTY changes and support for auto-updating known_hosts;
- Logic to support conpty (currently disabled until validation is complete)
- fdopen() and fchmod() support for file handles
- support for auto updating known_hosts via ssh and ssh-keygen
- Support for dynamic Windows-size changes with PTY
- Changes to support OneCore SDK
- Test cases
2018-07-25 15:15:05 -07:00

43 lines
1.2 KiB
PowerShell

$tC = 1
$tI = 0
$suite = "shellhost"
Describe "E2E scenarios for ssh-shellhost" -Tags "CI" {
BeforeAll {
}
BeforeEach {
}
AfterEach {$tI++;}
Context "$tC - shellhost commandline scenarios" {
BeforeAll {$tI=1}
AfterAll{$tC++}
It "$tC.$tI - exit code tests" -skip:$skip {
foreach ($i in (0,1,4,5,44)) {
ssh-shellhost -c cmd /c exit $i
$LASTEXITCODE | Should Be $i
}
}
It "$tC.$tI - various quote tests" -skip:$skip {
$o = ssh-shellhost -c cmd /c echo hello
$o | Should Be "hello"
$o = ssh-shellhost -c `"cmd /c echo hello`"
$o | Should Be "hello"
$o = ssh-shellhost -c cmd /c echo `"hello`"
$o | Should Be "`"hello`""
$o = ssh-shellhost -c `"cmd /c echo `"hello`"`"
$o | Should Be "`"hello`""
$o = ssh-shellhost -c `"cmd /c echo `"hello`"
$o | Should Be "`"hello"
$o = ssh-shellhost -c `"`"cmd`" /c echo `"hello`"`"
$o | Should Be "`"hello`""
}
}
}