diff --git a/test/powershell/PSDebugging.Tests.ps1 b/test/powershell/PSDebugging.Tests.ps1 index 6559572261..e8b8515eea 100644 --- a/test/powershell/PSDebugging.Tests.ps1 +++ b/test/powershell/PSDebugging.Tests.ps1 @@ -1,7 +1,17 @@ using namespace System.Diagnostics -Describe "PowerShell Command Debugging"{ - $powershell = Join-Path -Path $PsHome -ChildPath "powershell" +Describe "PowerShell Command Debugging" { + + BeforeAll { + # These tests cannot yet be run on OS X on Travis, or on any Windows, due to redirected stdin problems + if ($env:TRAVIS_OS_NAME -eq "osx" -or $IsWindows) { + $ItArgs = @{ pending = $true } + } else { + $ItArgs = @{} + } + + $powershell = Join-Path -Path $PsHome -ChildPath "powershell" + } function NewProcessStartInfo([string]$CommandLine, [switch]$RedirectStdIn) { @@ -33,7 +43,7 @@ Describe "PowerShell Command Debugging"{ } } - It "Should be able to step into debugging"{ + It @ItArgs "Should be able to step into debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -52,7 +62,7 @@ Describe "PowerShell Command Debugging"{ $process.ExitCode | Should Be 0 } - It "Should be able to continue into debugging"{ + It @ItArgs "Should be able to continue into debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -69,7 +79,7 @@ Describe "PowerShell Command Debugging"{ $process.ExitCode | Should Be 0 } - It "Should be able to list help for debugging"{ + It @ItArgs "Should be able to list help for debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -92,7 +102,7 @@ Describe "PowerShell Command Debugging"{ } - It "Should be able to step over debugging"{ + It @ItArgs "Should be able to step over debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -109,7 +119,7 @@ Describe "PowerShell Command Debugging"{ } - It "Should be able to step out of debugging"{ + It @ItArgs "Should be able to step out of debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -123,7 +133,7 @@ Describe "PowerShell Command Debugging"{ $process.ExitCode | Should Be 0 } - It "Should be able to quit debugging"{ + It @ItArgs "Should be able to quit debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") @@ -137,7 +147,7 @@ Describe "PowerShell Command Debugging"{ $process.ExitCode | Should Be 0 } - It "Should be able to list source code in debugging"{ + It @ItArgs "Should be able to list source code in debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") | Write-Host @@ -160,7 +170,7 @@ Describe "PowerShell Command Debugging"{ } - It "Should be able to get the call stack in debugging"{ + It @ItArgs "Should be able to get the call stack in debugging" { $debugfn = NewProcessStartInfo "-noprofile ""`$function:foo = { 'bar' }""" -RedirectStdIn $process = RunPowerShell $debugfn $process.StandardInput.Write("Set-PsBreakpoint -command foo`n") | Write-Host