Skip to content

Commit 4d100a7

Browse files
committed
fixes #200 - was already fixed, introduced test case
1 parent 500ee6e commit 4d100a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3644,4 +3644,9 @@ public void testSimilarToIssue789_2() throws JSQLParserException {
36443644
public void testCaseWhenExpressionIssue262() throws JSQLParserException {
36453645
assertSqlCanBeParsedAndDeparsed("SELECT X1, (CASE WHEN T.ID IS NULL THEN CASE P.WEIGHT * SUM(T.QTY) WHEN 0 THEN NULL ELSE P.WEIGHT END ELSE SUM(T.QTY) END) AS W FROM A LEFT JOIN T ON T.ID = ? RIGHT JOIN P ON P.ID = ?");
36463646
}
3647+
3648+
@Test
3649+
public void testCaseWhenExpressionIssue200() throws JSQLParserException {
3650+
assertSqlCanBeParsedAndDeparsed("SELECT * FROM t1, t2 WHERE CASE WHEN t1.id = 1 THEN t2.name = 'Marry' WHEN t1.id = 2 THEN t2.age = 10 END");
3651+
}
36473652
}

0 commit comments

Comments
 (0)