Skip to content

Commit bee9854

Browse files
kalgizTravisEz13
authored andcommitted
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
1 parent 1f9e9d2 commit bee9854

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ Describe "Select-Object DRT basic functionality" -Tags "CI" {
225225
$results.Count | Should -Be 0
226226
}
227227

228-
It "Select-Object with Start-Time In Idle Process should work"{
229-
$results = Get-Process i* | Select-Object ProcessName
228+
It "Select-Object with Start-Time In Idle Process should work" {
229+
$results = Get-Process * | Select-Object ProcessName
230230
$results.Count | Should -Not -Be 0
231231
}
232232

0 commit comments

Comments
 (0)