Skip to content

Commit f6abb9e

Browse files
committed
fixes #367
1 parent 01bcbd5 commit f6abb9e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/net/sf/jsqlparser/statement/BlockTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,18 @@ public void testGetStatements() throws JSQLParserException {
6262
+ "SELECT * FROM feature;\n"
6363
+ "END;\n", stmts.toString());
6464
}
65+
66+
@Test
67+
public void testBlock2() throws JSQLParserException {
68+
Statements stmts = CCJSqlParserUtil.parseStatements("begin\n"
69+
+ "update table1 set a = 'xx' where b = 'condition1';\n"
70+
+ "update table1 set a = 'xx' where b = 'condition2';\n"
71+
+ "end;");
72+
assertEquals("BEGIN\n"
73+
+ "UPDATE table1 SET a = 'xx' WHERE b = 'condition1';\n"
74+
+ "UPDATE table1 SET a = 'xx' WHERE b = 'condition2';\n"
75+
+ "END;\n"
76+
+ "", stmts.toString());
77+
78+
}
6579
}

0 commit comments

Comments
 (0)