Updated Split-Path to work with UNC Roots#2788
Updated Split-Path to work with UNC Roots#2788
Conversation
|
Hi @dchristian3188, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
| @@ -0,0 +1,49 @@ | ||
| Describe "SplitPath Tests (Windows Only)" -tags "CI" { |
There was a problem hiding this comment.
Windows [](start = 27, length = 8)
It seems like these should just be added to test/powershell/modules/Microsoft.PowerShell.Management/Split-Path.Tests.ps1
vors
left a comment
There was a problem hiding this comment.
Great work! Can we make tests more generic to cover Windows and non-Windows platforms?
| Split-Path -Parent "usr/local/bin" | Should Be "usr${dirSep}local" | ||
| } | ||
|
|
||
| Context "SplitPath Tests (Windows Only)" { |
There was a problem hiding this comment.
Why it's Windows Only? Can we cover all systems in these tests? I think the attitude of #2301 (comment) is to provide a consistent experience on all platforms.
There was a problem hiding this comment.
Ok, let me spin up a linux machine and take a stab at it.
|
Waiting on non-windows tests. |
|
Updated Tests. Please let me know if everything looks ok |
Currently splitting a UNC root on windows will return a empty string.
Please reference:
#2301