mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Replace DllImport with LibraryImport in SMA 2 (#18543)
This commit is contained in:
+1
-1
@@ -659,7 +659,7 @@ Describe "FileSystem Provider Extended Tests for Get-ChildItem cmdlet" -Tags "CI
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Validate Get-Item ResolvedTarget property" -Tag RequireAdminOnWindows {
|
||||
Describe "Validate Get-Item ResolvedTarget property" -Tags "Feature","RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
$rootDir = Join-Path "TestDrive:" "TestDir"
|
||||
|
||||
|
||||
@@ -65,3 +65,17 @@ Describe "Temp: drive" -Tag Feature {
|
||||
$res.Root | Should -BeExactly ([System.IO.Path]::GetTempPath())
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Get-PSDrive for network path" -Tags "Feature","RequireAdminOnWindows" {
|
||||
|
||||
It 'Check P/Invoke GetDosDevice/QueryDosDevice' -Skip:(-not $IsWindows) {
|
||||
$UsedDrives = Get-PSDrive | Select-Object -ExpandProperty Name
|
||||
$PSDriveName = 'D'..'Z' | Where-Object -FilterScript {$_ -notin $UsedDrives} | Get-Random
|
||||
|
||||
subst "$($PSDriveName):" \\localhost\c$\Windows
|
||||
|
||||
$drive = Get-PSDrive $PSDriveName
|
||||
$drive.DisplayRoot | Should -BeExactly '\\localhost\c$\Windows'
|
||||
subst "$($PSDriveName):" /D
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user