@@ -152,7 +152,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
152
152
}
153
153
154
154
It " $tC .$tI - multiple double quotes in cmdline" {
155
- # actual command line ssh target \ "cmd\ " /c \ "echo hello\ "
155
+ # actual command line ssh target "cmd" /c "echo hello"
156
156
$o = ssh test_target `" cmd`" / c `" echo hello`"
157
157
$o | Should Be " hello"
158
158
}
@@ -223,14 +223,14 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
223
223
$o | Should Be " hello"
224
224
}
225
225
It " $tC .$tI - multiple commands with double quotes in powershell cmdlet" - skip:$skip {
226
- # actual command line ssh target cd "$env:programfiles";pwd
226
+ # actual command line ssh target cd "$env:programfiles\ ";pwd
227
227
$o = ssh test_target " cd `"`$ env:programfiles\`" ;pwd"
228
228
$LASTEXITCODE | Should Be 0
229
229
$match = $o -match " Program Files"
230
230
$match.count | Should be 1
231
231
}
232
232
It " $tC .$tI - multiple commands with double quotes in powershell cmdlet" - skip:$skip {
233
- # actual command line ssh target dir "$env:programfiles";cd "$env:programfiles";pwd
233
+ # actual command line ssh target dir "$env:programfiles\ ";cd "$env:programfiles\ ";pwd
234
234
$o = ssh test_target " dir `"`$ env:programfiles\`" ;cd `"`$ env:programfiles\`" ;pwd"
235
235
$LASTEXITCODE | Should Be 0
236
236
# $o -contains "Program Files" | Shosshuld Be $True
@@ -262,7 +262,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
262
262
$o | Should Contain " cmd"
263
263
}
264
264
It " $tC .$tI - cmd as default shell and double quotes in cmdline" {
265
- # actual command line ssh target echo "\" hello\" "
265
+ # actual command line ssh target echo "hello"
266
266
$o = ssh test_target echo " `" hello`" "
267
267
$o | Should Be " `" hello`" "
268
268
}
@@ -285,7 +285,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
285
285
Remove-ItemProperty - Path $dfltShellRegPath - Name $dfltShellCmdOptionRegKeyName - ErrorAction SilentlyContinue
286
286
}
287
287
It " $tC .$tI - shellhost as default shell and multiple double quotes in cmdline" {
288
- # actual command line ssh target \ "cmd\ " /c \ "echo \ "hello\"\ "
288
+ # actual command line ssh target "cmd" /c "echo "hello" "
289
289
$o = ssh test_target `" cmd`" / c `" echo `" hello`"`"
290
290
$o | Should Be " `" hello`" "
291
291
}
0 commit comments