Skip to content

Commit c8feb9c

Browse files
committed
Add test case for general paths
1 parent 3770023 commit c8feb9c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/Rules/UseCorrectCasing.tests.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ Describe "UseCorrectCasing" {
3939
Invoke-Formatter 'invoke-dummyFunction' | Should -Be 'Invoke-DummyFunction'
4040
}
4141

42-
It "preserves script paths" -Skip:($IsLinux -or $IsMacOS) {
42+
It "preserves script path" {
43+
$path = Join-Path $TestDrive "$([guid]::NewGuid()).ps1"
44+
New-Item -ItemType File -Path $path
45+
$scriptDefinition = ". $path"
46+
Invoke-Formatter $scriptDefinition | Should -Be $scriptDefinition
47+
}
48+
49+
It "preserves UNC script path" -Skip:($IsLinux -or $IsMacOS) {
4350
$uncPath = [System.IO.Path]::Combine("\\$(HOSTNAME.EXE)\C$\", $TestDrive, "$([guid]::NewGuid()).ps1")
4451
New-Item -ItemType File -Path $uncPath
4552
$scriptDefinition = ". $uncPath"

0 commit comments

Comments
 (0)