Skip to content

Commit 7c64c0f

Browse files
authored
Enable network Select-String test (PowerShell#4921)
* Enable network string test * Fix typo * Use Get-Item to add PSDrive property
1 parent 414d561 commit 7c64c0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/powershell/Modules/Microsoft.PowerShell.Utility/string.tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
$pathWithoutWildcard = $TestDrive
1515
$pathWithWildcard = Join-Path $TestDrive '*'
1616

17-
$tempFile = New-TemporaryFile
17+
# Here Get-ChildItem adds 'PSDrive' property
18+
$tempFile = New-TemporaryFile | Get-Item
1819
"abc" | Out-File -LiteralPath $tempFile.fullname
1920
"bcd" | Out-File -LiteralPath $tempFile.fullname -Append
2021
"cde" | Out-File -LiteralPath $tempFile.fullname -Append
@@ -49,7 +50,7 @@
4950
(select-string -LiteralPath $fileNameWithDots "b").count | Should Be 2
5051
}
5152

52-
It "Network path" -skip:($IsCoreCLR) {
53+
It "Network path" -skip:(!$IsWindows) {
5354
(select-string -LiteralPath $fileNameAsNetworkPath "b").count | Should Be 2
5455
}
5556

0 commit comments

Comments
 (0)