1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Files
sqlite/test/clierrors.sql
drh 0a8c82266c Improved error handling in the ".import" command of the CLI.
[forum:/info/2026-10-09T17:57:07Z|Forum post 2026-10-09T17:57:07Z].

FossilOrigin-Name: 48fedacea79a9cd0a93d88dc38588ae0f1a011ed908b41ba4f2e2ee1160ffa44
2026-10-09 18:34:26 +00:00

72 lines
1.4 KiB
SQL

#!sqlite3
#
# 2026-10-09
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
# Test cases for error handling in dot-commands.
#
# ./sqlite3 test/clierrors.sql
#
#
.testcase 100
.import file table extra
.check --glob <<END
*: .import file table extra
*: ^--- unknown argument
END
.testcase 110
.import file table --schema
.check --glob <<END
*: .import file table --schema
*: ^--- missing argument
END
.testcase 120
.import file table --skip
.check --glob <<END
*: .import file table --skip
*: ^--- missing argument
END
.testcase 130
.import --esc
.check --glob <<END
*: .import --esc
*: ^--- missing argument
END
.testcase 140
.import --qesc
.check --glob <<END
*: .import --qesc
*: ^--- missing argument
END
.testcase 150
.import --rowsep
.check --glob <<END
*: .import --rowsep
*: ^--- missing argument
END
.testcase 160
.import --colsep
.check --glob <<END
*: .import --colsep
*: ^--- missing argument
END
.testcase 170
.import --xyzzy
.check --glob <<END
*: .import --xyzzy
*: ^--- unknown option
END
.testcase 180
.import --colsep hi
.check --glob <<END
*: Missing FILE argument
END