Skip to content

Commit 5fb03fb

Browse files
committed
Probably need this test for #2402 also.
1 parent 2991c0a commit 5fb03fb

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

RubberduckTests/SmartIndenter/LineContinuationTests.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,5 +767,33 @@ public void SplitNamedParameterAlignsCorrectly()
767767
var actual = indenter.Indent(code, string.Empty);
768768
Assert.IsTrue(expected.SequenceEqual(actual));
769769
}
770+
771+
//https://github.com/rubberduck-vba/Rubberduck/issues/2402
772+
[TestMethod] // Broken in VB6 SmartIndenter.
773+
[TestCategory("Indenter")]
774+
public void MultipleSplitNamedParametersAlignCorrectly()
775+
{
776+
var code = new[]
777+
{
778+
"Sub Foo()",
779+
"Debug.Print WorksheetFunction.Sum(arg1:=1, arg2:=2, arg3 _",
780+
":=3, arg4:=4, arg5:=6, arg6 _",
781+
":=6)",
782+
"End Sub"
783+
};
784+
785+
var expected = new[]
786+
{
787+
"Sub Foo()",
788+
" Debug.Print WorksheetFunction.Sum(arg1:=1, arg2:=2, arg3 _",
789+
" :=3, arg4:=4, arg5:=6, arg6 _",
790+
" :=6)",
791+
"End Sub"
792+
};
793+
794+
var indenter = new Indenter(null, () => IndenterSettingsTests.GetMockIndenterSettings());
795+
var actual = indenter.Indent(code, string.Empty);
796+
Assert.IsTrue(expected.SequenceEqual(actual));
797+
}
770798
}
771799
}

0 commit comments

Comments
 (0)