Fix UNC path completion regression (#20419)

This commit is contained in:
MartinGC94
2023-10-16 15:43:48 -07:00
committed by GitHub
parent 2e5bd015c3
commit 6176fd3fcf
2 changed files with 14 additions and 12 deletions
@@ -1276,6 +1276,11 @@ class InheritedClassTest : System.Attribute
}
}
It 'Should correct slashes in UNC path completion' -Skip:(!$IsWindows) {
$Res = TabExpansion2 -inputScript 'Get-ChildItem //localhost/c$/Windows'
$Res.CompletionMatches[0].CompletionText | Should -Be "'\\localhost\c$\Windows'"
}
It 'Should keep custom drive names when completing file paths' {
$TempDriveName = "asdf"
$null = New-PSDrive -Name $TempDriveName -PSProvider FileSystem -Root $HOME