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 / test / safemode.clitest
| 1 | #!sqlite3 |
| 2 | # |
| 3 | # 2026-10-10 |
| 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 that only work if the CLI is run in --safe mode. |
| 15 | # |
| 16 | # ./sqlite3 --safe test/clierrors.sql |
| 17 | # |
| 18 | # |
| 19 | .testcase 100 |
| 20 | .mode list --null NULL |
| 21 | SELECT readfile('probe.txt'); |
| 22 | .check --glob <<END |
| 23 | *no such function: readfile |
| 24 | SELECT readfile('probe.txt'); |
| 25 | ^--- error here |
| 26 | END |
| 27 | |
| 28 | # Bug 2026-10-10T13:15:05Z |
| 29 | .testcase 110 |
| 30 | SELECT data FROM fsdir('probe.txt'); |
| 31 | .check --glob '*no such table: fsdir' |