sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
sqlite / ext / jni / src / tests / 000-000-sanity.test
| 1 | /* |
| 2 | ** This is a comment. There are many like it but this one is mine. |
| 3 | ** |
| 4 | ** SCRIPT_MODULE_NAME: sanity-check |
| 5 | ** xMIXED_MODULE_NAME: mixed-module |
| 6 | ** xMODULE_NAME: module-name |
| 7 | ** xREQUIRED_PROPERTIES: small fast reliable |
| 8 | ** xREQUIRED_PROPERTIES: RECURSIVE_TRIGGERS |
| 9 | ** xREQUIRED_PROPERTIES: TEMPSTORE_FILE TEMPSTORE_MEM |
| 10 | ** xREQUIRED_PROPERTIES: AUTOVACUUM INCRVACUUM |
| 11 | ** |
| 12 | */ |
| 13 | --print starting up 😃 |
| 14 | --close all |
| 15 | --oom |
| 16 | --db 0 |
| 17 | --new my.db |
| 18 | --null zilch |
| 19 | --testcase 1.0 |
| 20 | SELECT 1, null; |
| 21 | --result 1 zilch |
| 22 | --glob *zil* |
| 23 | --notglob *ZIL* |
| 24 | SELECT 1, 2; |
| 25 | intentional error; |
| 26 | --run |
| 27 | --testcase json-1 |
| 28 | SELECT json_array(1,2,3) |
| 29 | --json [1,2,3] |
| 30 | --testcase tableresult-1 |
| 31 | select 1, 'a'; |
| 32 | select 2, 'b'; |
| 33 | --tableresult |
| 34 | # [a-z] |
| 35 | 2 b |
| 36 | --end |
| 37 | --testcase json-block-1 |
| 38 | select json_array(1,2,3); |
| 39 | select json_object('a',1,'b',2); |
| 40 | --json-block |
| 41 | [1,2,3] |
| 42 | {"a":1,"b":2} |
| 43 | --end |
| 44 | --testcase col-names-on |
| 45 | --column-names 1 |
| 46 | select 1 as 'a', 2 as 'b'; |
| 47 | --result a 1 b 2 |
| 48 | --testcase col-names-off |
| 49 | --column-names 0 |
| 50 | select 1 as 'a', 2 as 'b'; |
| 51 | --result 1 2 |
| 52 | --close |
| 53 | --print reached the end 😃 |