diff --git a/contrib/win32/openssh/OpenSSHTestHelper.psm1 b/contrib/win32/openssh/OpenSSHTestHelper.psm1 index a87a8573f..61a845e48 100644 --- a/contrib/win32/openssh/OpenSSHTestHelper.psm1 +++ b/contrib/win32/openssh/OpenSSHTestHelper.psm1 @@ -692,6 +692,7 @@ function Invoke-OpenSSHE2ETest # $testFolders = @(Get-ChildItem *.tests.ps1 -Recurse | ForEach-Object{ Split-Path $_.FullName} | Sort-Object -Unique) # Invoke-Pester $testFolders -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru Invoke-Pester .\SSH.tests.ps1 -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru + Invoke-Pester .\ShellHost.tests.ps1 -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru Pop-Location } diff --git a/regress/pesterTests/SSH.Tests.ps1 b/regress/pesterTests/SSH.Tests.ps1 index 5b4c1bcf1..a2be65435 100644 --- a/regress/pesterTests/SSH.Tests.ps1 +++ b/regress/pesterTests/SSH.Tests.ps1 @@ -220,7 +220,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" { It "$tC.$tI - powershell as default shell and double quotes in cmdline" { # actual command line ssh target echo `"hello`" $o = ssh test_target echo `"hello`" - $o | Should Be "`"hello`"" + $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 @@ -233,7 +233,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" { # 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" | Should Be $True + #$o -contains "Program Files" | Shosshuld Be $True $match = $o -match "Program Files" $match.count | Should Be 3 } diff --git a/regress/pesterTests/ShellHost.Tests.ps1 b/regress/pesterTests/ShellHost.Tests.ps1 index a85edf22f..8a68cacbc 100644 --- a/regress/pesterTests/ShellHost.Tests.ps1 +++ b/regress/pesterTests/ShellHost.Tests.ps1 @@ -23,18 +23,18 @@ Describe "E2E scenarios for ssh-shellhost" -Tags "CI" { } 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`"" + $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" }