Skip to content

Commit

Permalink
Add test to demonstrate fix for #1452 (loss of whitespace in sp… (#1702)
Browse files Browse the repository at this point in the history
(probably fixed by #1627)
  • Loading branch information
rnorth authored Sep 7, 2019
1 parent 4fbef4b commit b1cb06d
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,21 @@ public void testUnclosedBlockComment() {
}
}

@Test
public void testIssue1452Case() {
String script = "create table test (text VARCHAR(255));\n" +
"\n" +
"/* some comment */\n" +
"insert into `test` (`text`) values ('a b');";

List<String> expected = asList(
"create table test (text VARCHAR(255))",
"insert into `test` (`text`) values ('a b')"
);

splitAndCompare(script, expected);
}

private void splitAndCompare(String script, List<String> expected) {
final List<String> statements = doSplit(script);
Assertions.assertThat(statements).isEqualTo(expected);
Expand Down

0 comments on commit b1cb06d

Please sign in to comment.