From bee98547e44c12bf295faa7390885ccb5b285a18 Mon Sep 17 00:00:00 2001 From: Klaudia Algiz Date: Mon, 30 Apr 2018 13:09:16 -0700 Subject: [PATCH] Fix Select-Object.Tests.ps1 which might fail for Unix OS. (#6747) Fix Select-Object.Tests.ps1 which might fail for Unix OS. In the test, the processes which name matches i* are selected and it checks if there is non zero number of these processes. The test assumes that there is always at least one process, probably `init` - idle, but on Unix idle process does not have the name and hence the test might fail --- .../Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 index b1d44da530..79849cc4db 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 @@ -225,8 +225,8 @@ Describe "Select-Object DRT basic functionality" -Tags "CI" { $results.Count | Should -Be 0 } - It "Select-Object with Start-Time In Idle Process should work"{ - $results = Get-Process i* | Select-Object ProcessName + It "Select-Object with Start-Time In Idle Process should work" { + $results = Get-Process * | Select-Object ProcessName $results.Count | Should -Not -Be 0 }