Add support for multiple paths to Join-Path

Multiple child paths can be specified via the new positional parameter -AdditionalChildPath.
This commit is contained in:
Dave Wyatt authored and Jason Shirk (POWERSHELL) committed 2016-08-31 13:48:31 -07:00
1 parent 77a37f7773
commit 22aac12c3e
2 files changed
+28 -2

No files matched your search

@@ -43,4 +43,9 @@ Describe "Join-Path cmdlet tests" -Tags "CI" {
$result.Count | Should be 1
$result | Should BeExactly ("Env:"+$SepChar+"foo")
}
It "should be able to join multiple child paths passed by position with remaining arguments" {
$result = Join-Path one two three four five
$result.Count | Should Be 1
$result | Should BeExactly "one${sepChar}two${sepChar}three${sepChar}four${sepChar}five"
}
}