Mark tests as pending on Travis's OS X and on Windows

Because redirected `stdin` does not yet work on Windows, and because any
output based test does not yet work on OS X on Travis (where this is no
TTY), we cannot yet run these tests on those platforms.
This commit is contained in:
Andrew Schwartzmeyer
2016-06-15 12:36:17 -07:00
parent acd9249fe2
commit 7d1ce65079
+20 -10
View File
@@ -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