Throw PlatformNotSupported on Windows .NET Core build

This commit is contained in:
Andrew Schwartzmeyer committed 2016-07-08 14:08:22 -07:00
1 parent 6200f084cd
commit 50e6627a8e
3 files changed
+23 -59

No files matched your search

@@ -37,10 +37,14 @@ Describe "Invoke-Item" {
$testfile = Join-Path $TestDrive testfile.txt
}
It "Should invoke a text file without error" {
It "Should invoke a text file without error" -Skip:($IsWindows -and $IsCore) {
$debugfn = NewProcessStartInfo "-noprofile ""``Invoke-Item $testfile`n" -RedirectStdIn
$process = RunPowerShell $debugfn
EnsureChildHasExited $process
$process.ExitCode | Should Be 0
}
It "Should throw not supported on Windows with .NET Core" -Skip:($IsLinux -or $IsOSX -or !$IsCore) {
{ Invoke-Item $testfile }| Should Throw "Operation is not supported on this platform."
}
}