add case-sensitive test
This commit is contained in:
parent
f0264d0147
commit
882e94f1cb
|
@ -76,6 +76,18 @@ Describe "Set-Location" -Tags "CI" {
|
|||
$(Get-Location).Path | Should -BeExactly $testPath.FullName
|
||||
}
|
||||
|
||||
It "Should use actual casing of folder on case-sensitive filesystem: <dir>" -Skip:(!$IsLinux)
|
||||
{
|
||||
$dir = "teST"
|
||||
$testPathLower = New-Item -ItemType Directory -Path (Join-Path $TestDrive $dir.ToLower())
|
||||
$testPathUpper = New-Item -ItemType Directory -Path (Join-Path $TestDrive $dir.ToUpper())
|
||||
Set-Location $testPathLower.FullName
|
||||
$(Get-Location).Path | Should -BeExactly $testPathLower.FullName
|
||||
Set-Location $testPathUpper.FullName
|
||||
$(Get-Location).Path | Should -BeExactly $testPathUpper.FullName
|
||||
{ Set-Locaiton (Join-Path $TestDrive $dir) } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand"
|
||||
}
|
||||
|
||||
Context 'Set-Location with no arguments' {
|
||||
|
||||
It 'Should go to $env:HOME when Set-Location run with no arguments from FileSystem provider' {
|
||||
|
|
Loading…
Reference in a new issue