From 0df9b76322969ccbb1ca57156c840f1b8bc73e10 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 4 Mar 2016 17:21:04 -0800 Subject: [PATCH] Fix Start-Process tests OS X's ping command requires the flags to be specified before the arguments. I also reduced the ping count so that the tests execute a bit faster. This resolves #556. --- test/powershell/Start-Process.Tests.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/powershell/Start-Process.Tests.ps1 b/test/powershell/Start-Process.Tests.ps1 index 42503e107c..341ffe3e20 100644 --- a/test/powershell/Start-Process.Tests.ps1 +++ b/test/powershell/Start-Process.Tests.ps1 @@ -3,13 +3,11 @@ Describe "Start-Process" { $pingDirectory = Split-Path $pingCommand -Parent $tempFile = Join-Path -Path $TestDrive -ChildPath PSTest $assetsFile = Join-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath assets) -ChildPath SortTest.txt - if ($IsWindows) - { - $pingParam = "localhost -n 4" + if ($IsWindows) { + $pingParam = "-n 2 localhost" } - else - { - $pingParam = "localhost -c 4" + elseif ($IsLinux -Or $IsOSX) { + $pingParam = "-c 2 localhost" } It "Should process arguments without error" {