interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / test / shell-parse.clitest

43 lines · 932 bytes Raw Blame History
1.testcase 100
2/* Unterminated SQL comment */
3SELECT 1; -- hi
4
5/* SQL comment terminted by ; */
6SELECT 2; -- hi ;
7
8/* A C-style commend across multiple lines */
9SELECT 3; /* hi
10and more
11and more */
12
13/* SQL text keeps growing */
14SELECT 4
15; SELECT 5
16; SELECT 6
17; SELECT 7;
18
19/* CREATE TRIGGER */
20CREATE TRIGGER xyz
21 SELECT 8;
22 SELECT 9;
23 -- END;
24END;
25.check <<END
261 line: SELECT 1; -- hi
271 line: SELECT 2; -- hi ;
283 lines: SELECT 3; /* hi\nand more\nand more */
294 lines: SELECT 4\n; SELECT 5 ... SELECT 6\n; SELECT 7;
305 lines: CREATE TRIGGER xyz\n ... CT 9;\n -- END;\nEND;
31END
32
33/* No " ... " for statements that fit in prefix+suffix.
34** https://sqlite.org/bugs/info/23d77b5d47908a41 */
35.testcase 110
36SELECT 1;
37SELECT 12345678901234567890123456789012;
38SELECT 123456789012345678901234567890123;
39.check <<END
401 line: SELECT 1;
411 line: SELECT 12345678901234567890123456789012;
421 line: SELECT 1234567890123 ... 5678901234567890123;
43END