Skip to content

Commit 964991c

Browse files
committed
integrated test for values query
1 parent c032744 commit 964991c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/java/net/sf/jsqlparser/statement/values/ValuesTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
import org.junit.Test;
66

77
public class ValuesTest {
8-
8+
99
@Test
1010
public void testDuplicateKey() throws JSQLParserException {
1111
assertSqlCanBeParsedAndDeparsed("VALUES (1, 2, 'test')");
1212
}
13+
14+
@Test
15+
public void testComplexWithQueryIssue561() throws JSQLParserException {
16+
assertSqlCanBeParsedAndDeparsed("WITH split(word, str, hascomma) AS (values('', 'Auto,A,1234444', 1) UNION ALL SELECT substr(str, 0, case when instr(str, ',') then instr(str, ',') else length(str)+1 end), ltrim(substr(str, instr(str, ',')), ','), instr(str, ',') FROM split WHERE hascomma) SELECT trim(word) FROM split WHERE word!=''");
17+
}
1318
}

0 commit comments

Comments
 (0)