sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
| 1 | #!sqlite3 |
| 2 | # |
| 3 | # 2026-10-09 |
| 4 | # |
| 5 | # The author disclaims copyright to this source code. In place of |
| 6 | # a legal notice, here is a blessing: |
| 7 | # |
| 8 | # May you do good and not evil. |
| 9 | # May you find forgiveness for yourself and forgive others. |
| 10 | # May you share freely, never taking more than you give. |
| 11 | # |
| 12 | #*********************************************************************** |
| 13 | # |
| 14 | # Test cases for error handling in dot-commands. |
| 15 | # |
| 16 | # ./sqlite3 test/clierrors.sql |
| 17 | # |
| 18 | # |
| 19 | .open :memory: |
| 20 | .mode -reset test |
| 21 | .testcase 100 |
| 22 | .import file table extra |
| 23 | .check --glob <<END |
| 24 | *: .import file table extra |
| 25 | *: ^--- unknown argument |
| 26 | END |
| 27 | .testcase 110 |
| 28 | .import file table --schema |
| 29 | .check --glob <<END |
| 30 | *: .import file table --schema |
| 31 | *: ^--- missing argument |
| 32 | END |
| 33 | .testcase 120 |
| 34 | .import file table --skip |
| 35 | .check --glob <<END |
| 36 | *: .import file table --skip |
| 37 | *: ^--- missing argument |
| 38 | END |
| 39 | .testcase 130 |
| 40 | .import --esc |
| 41 | .check --glob <<END |
| 42 | *: .import --esc |
| 43 | *: ^--- missing argument |
| 44 | END |
| 45 | .testcase 140 |
| 46 | .import --qesc |
| 47 | .check --glob <<END |
| 48 | *: .import --qesc |
| 49 | *: ^--- missing argument |
| 50 | END |
| 51 | .testcase 150 |
| 52 | .import --rowsep |
| 53 | .check --glob <<END |
| 54 | *: .import --rowsep |
| 55 | *: ^--- missing argument |
| 56 | END |
| 57 | .testcase 160 |
| 58 | .import --colsep |
| 59 | .check --glob <<END |
| 60 | *: .import --colsep |
| 61 | *: ^--- missing argument |
| 62 | END |
| 63 | .testcase 170 |
| 64 | .import --xyzzy |
| 65 | .check --glob <<END |
| 66 | *: .import --xyzzy |
| 67 | *: ^--- unknown option |
| 68 | END |
| 69 | .testcase 180 |
| 70 | .import --colsep hi |
| 71 | .check --glob <<END |
| 72 | *: Missing FILE argument |
| 73 | END |