Enable network Select-String test (#4921)
* Enable network string test * Fix typo * Use Get-Item to add PSDrive property
This commit is contained in:
parent
414d56170b
commit
7c64c0ff25
|
@ -14,7 +14,8 @@
|
|||
$pathWithoutWildcard = $TestDrive
|
||||
$pathWithWildcard = Join-Path $TestDrive '*'
|
||||
|
||||
$tempFile = New-TemporaryFile
|
||||
# Here Get-ChildItem adds 'PSDrive' property
|
||||
$tempFile = New-TemporaryFile | Get-Item
|
||||
"abc" | Out-File -LiteralPath $tempFile.fullname
|
||||
"bcd" | Out-File -LiteralPath $tempFile.fullname -Append
|
||||
"cde" | Out-File -LiteralPath $tempFile.fullname -Append
|
||||
|
@ -49,7 +50,7 @@
|
|||
(select-string -LiteralPath $fileNameWithDots "b").count | Should Be 2
|
||||
}
|
||||
|
||||
It "Network path" -skip:($IsCoreCLR) {
|
||||
It "Network path" -skip:(!$IsWindows) {
|
||||
(select-string -LiteralPath $fileNameAsNetworkPath "b").count | Should Be 2
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue