Apply suggestions from code review
Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>
This commit is contained in:
parent
806eb63576
commit
f574496b3f
|
@ -152,7 +152,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
}
|
||||
|
||||
It "$tC.$tI - multiple double quotes in cmdline" {
|
||||
# actual command line ssh target \"cmd\" /c \"echo hello\"
|
||||
# actual command line ssh target "cmd" /c "echo hello"
|
||||
$o = ssh test_target `"cmd`" /c `"echo hello`"
|
||||
$o | Should Be "hello"
|
||||
}
|
||||
|
@ -223,14 +223,14 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
$o | Should Be "hello"
|
||||
}
|
||||
It "$tC.$tI - multiple commands with double quotes in powershell cmdlet" -skip:$skip {
|
||||
# actual command line ssh target cd "$env:programfiles";pwd
|
||||
# actual command line ssh target cd "$env:programfiles\";pwd
|
||||
$o = ssh test_target "cd `"`$env:programfiles\`";pwd"
|
||||
$LASTEXITCODE | Should Be 0
|
||||
$match = $o -match "Program Files"
|
||||
$match.count | Should be 1
|
||||
}
|
||||
It "$tC.$tI - multiple commands with double quotes in powershell cmdlet" -skip:$skip {
|
||||
# actual command line ssh target dir "$env:programfiles";cd "$env:programfiles";pwd
|
||||
# actual command line ssh target dir "$env:programfiles\";cd "$env:programfiles\";pwd
|
||||
$o = ssh test_target "dir `"`$env:programfiles\`";cd `"`$env:programfiles\`";pwd"
|
||||
$LASTEXITCODE | Should Be 0
|
||||
#$o -contains "Program Files" | Shosshuld Be $True
|
||||
|
@ -262,7 +262,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
$o | Should Contain "cmd"
|
||||
}
|
||||
It "$tC.$tI - cmd as default shell and double quotes in cmdline" {
|
||||
# actual command line ssh target echo "\"hello\""
|
||||
# actual command line ssh target echo "hello"
|
||||
$o = ssh test_target echo "`"hello`""
|
||||
$o | Should Be "`"hello`""
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
Remove-ItemProperty -Path $dfltShellRegPath -Name $dfltShellCmdOptionRegKeyName -ErrorAction SilentlyContinue
|
||||
}
|
||||
It "$tC.$tI - shellhost as default shell and multiple double quotes in cmdline" {
|
||||
# actual command line ssh target \"cmd\" /c \"echo \"hello\"\"
|
||||
# actual command line ssh target "cmd" /c "echo "hello""
|
||||
$o = ssh test_target `"cmd`" /c `"echo `"hello`"`"
|
||||
$o | Should Be "`"hello`""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue