Skip to content

Commit 685e17e

Browse files
author
Kapil Borle
committed
Add test to handle DollarParen token kind
1 parent 4c1e248 commit 685e17e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/Rules/UseConsistentIndentation.tests.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,20 @@ $param3
9797
$violations.Count | Should Be 4
9898
}
9999
}
100+
101+
Context "When a sub-expression is provided" {
102+
BeforeAll {
103+
$def = @'
104+
function foo {
105+
$x = $("abc")
106+
$x
107+
}
108+
'@
109+
$violations = Invoke-ScriptAnalyzer -ScriptDefinition $def -Settings $settings
110+
}
111+
112+
It "Should not find a violations" {
113+
$violations.Count | Should Be 0
114+
}
115+
}
100116
}

0 commit comments

Comments
 (0)