Skip to content

Commit

Permalink
added failing test for #4460
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed Oct 26, 2018
1 parent 5e42b68 commit 85e435f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion RubberduckTests/AutoComplete/CodePaneHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void GivenExtraWhitespace_PrettifiedCaretStillAtSameToken()

[Test]
[Category("AutoComplete")]
public void GivenMultilineLogicalLine_StillTracksCaret()
public void GivenMultilineLogicalLine_TracksCaret()
{
var original = @"
MsgBox ""test"" & vbNewLine & _
Expand All @@ -91,6 +91,20 @@ public void GivenMultilineLogicalLine_StillTracksCaret()
Assert.AreEqual(original, actual);
}

[Test]
[Category("AutoComplete")]
public void GivenPartialMultilineInstruction_TracksCaret()
{
var original = @"
ExecuteStoredProcedure (""AddAppointmentCountForAClinic"", False,dbconfig.SQLConString, _
| thisClinic.ClinicID ,".ToCodeString();

var sut = InitializeSut(original, original, out var module, out _);
var actual = new TestCodeString(sut.Prettify(module.Object, original));

Assert.AreEqual(original, actual);
}

private static ICodePaneHandler InitializeSut(TestCodeString original, TestCodeString prettified, out Mock<ICodeModule> module, out Mock<ICodePane> pane)
{
var builder = new MockVbeBuilder();
Expand Down

0 comments on commit 85e435f

Please sign in to comment.