Fix Start-Job working directory path with trailing back slash (#11041)

This commit is contained in:
Paul Higinbotham
2019-11-15 17:05:27 -08:00
committed by Aditya Patwardhan
parent 8ff29ddc62
commit bd0e30dec1
2 changed files with 26 additions and 27 deletions
@@ -94,6 +94,11 @@ Describe 'Basic Job Tests' -Tags 'CI' {
$jobOutput | Should -BeExactly $path.ToString()
}
It 'Verifies the working directory parameter path with trailing backslash' -Skip:(! $IsWindows) {
$job = Start-Job { $pwd } -WorkingDirectory '\' | Wait-Job
$job.JobStateInfo.State | Should -BeExactly 'Completed'
}
It 'Throws an error when the working directory parameter is <case>' -TestCases $invalidPathTestCases {
param($path, $case, $expectedErrorId)