mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Handle exception if enumerating files fails when rebuilding path to have correct casing (#11014)
This commit is contained in:
1 parent
1c817c699a
commit
e185f89591
2 files changed
+30
-5
No files matched your search
@@ -279,6 +279,23 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Appx path" {
|
||||
BeforeAll {
|
||||
$skipTest = $true
|
||||
if ($IsWindows -and (Get-Command -Name Get-AppxPackage) -and (Get-AppxPackage Microsoft.WindowsCalculator)) {
|
||||
$skipTest = $false
|
||||
}
|
||||
}
|
||||
|
||||
It "Can get an appx package item" -Skip:$skipTest {
|
||||
$pkgDir = (Get-AppxPackage)[0].InstallLocation
|
||||
|
||||
Get-Item $pkgDir\Calculator.exe -ErrorAction Stop | Should -BeOfType [System.IO.FileInfo]
|
||||
Get-Item -Path $pkgDir -ErrorAction Stop | Should -BeOfType [System.IO.DirectoryInfo]
|
||||
Get-ChildItem -Path $pkgDir -ErrorAction Stop | Should -Not -BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
|
||||
Context "Validate basic host navigation functionality" {
|
||||
BeforeAll {
|
||||
#build semi-complex directory structure to test navigation within
|
||||
|
||||
Reference in new issue
Block a user