diff --git a/regress/pesterTests/SSH.Tests.ps1 b/regress/pesterTests/SSH.Tests.ps1 index a2be65435..ecb676833 100644 --- a/regress/pesterTests/SSH.Tests.ps1 +++ b/regress/pesterTests/SSH.Tests.ps1 @@ -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`"" }