Skip to content

Commit f574496

Browse files
Apply suggestions from code review
Co-authored-by: Paul Higinbotham <[email protected]>
1 parent 806eb63 commit f574496

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

regress/pesterTests/SSH.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
152152
}
153153

154154
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"
156156
$o = ssh test_target `"cmd`" /c `"echo hello`"
157157
$o | Should Be "hello"
158158
}
@@ -223,14 +223,14 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
223223
$o | Should Be "hello"
224224
}
225225
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
227227
$o = ssh test_target "cd `"`$env:programfiles\`";pwd"
228228
$LASTEXITCODE | Should Be 0
229229
$match = $o -match "Program Files"
230230
$match.count | Should be 1
231231
}
232232
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
234234
$o = ssh test_target "dir `"`$env:programfiles\`";cd `"`$env:programfiles\`";pwd"
235235
$LASTEXITCODE | Should Be 0
236236
#$o -contains "Program Files" | Shosshuld Be $True
@@ -262,7 +262,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
262262
$o | Should Contain "cmd"
263263
}
264264
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"
266266
$o = ssh test_target echo "`"hello`""
267267
$o | Should Be "`"hello`""
268268
}
@@ -285,7 +285,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
285285
Remove-ItemProperty -Path $dfltShellRegPath -Name $dfltShellCmdOptionRegKeyName -ErrorAction SilentlyContinue
286286
}
287287
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""
289289
$o = ssh test_target `"cmd`" /c `"echo `"hello`"`"
290290
$o | Should Be "`"hello`""
291291
}

0 commit comments

Comments
 (0)