Skip to content

Commit b2a5b73

Browse files
liamjpetersandyleejordan
authored andcommitted
Add tests to ensure formatting is still checked when LParen is the first token on a line, followed by a non-newline, non-comment
1 parent 988143f commit b2a5b73

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/Rules/UseConsistentIndentation.tests.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,18 @@ function test {
177177
'@
178178
Invoke-Formatter -ScriptDefinition $IdempotentScriptDefinition | Should -Be $idempotentScriptDefinition
179179
}
180+
181+
It 'Should find violation in script when LParen is first token on a line and is not followed by Newline' {
182+
$ScriptDefinition = @'
183+
(foo)
184+
(bar)
185+
'@
186+
$ExpectedScriptDefinition = @'
187+
(foo)
188+
(bar)
189+
'@
190+
Invoke-FormatterAssertion $ScriptDefinition $ExpectedScriptDefinition 2 $settings
191+
}
180192
}
181193

182194
Context "When a sub-expression is provided" {

0 commit comments

Comments
 (0)