Handle exception if enumerating files fails when rebuilding path to have correct casing (#11014)

This commit is contained in:
Steve Lee authored and Andrew committed 2019-11-12 08:53:33 -08:00
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