mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Improvements to error messages for errors in the dot-commands of the
command-line shell. Add the ".once" command. The output of ".help" now goes to the designated output channel. FossilOrigin-Name: 48dce821a07ac29da6ce05e92cf3f6e52b6eb388
This commit is contained in:
@ -40,29 +40,29 @@ forcedelete test.db test.db-journal test.db-wal
|
||||
# .import FILE TABLE Import data from FILE into TABLE
|
||||
do_test shell5-1.1.1 {
|
||||
catchcmd "test.db" ".import"
|
||||
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
|
||||
} {1 {Usage: .import FILE TABLE}}
|
||||
do_test shell5-1.1.2 {
|
||||
catchcmd "test.db" ".import FOO"
|
||||
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
|
||||
} {1 {Usage: .import FILE TABLE}}
|
||||
#do_test shell5-1.1.2 {
|
||||
# catchcmd "test.db" ".import FOO BAR"
|
||||
#} {1 {Error: no such table: BAR}}
|
||||
do_test shell5-1.1.3 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".import FOO BAR BAD"
|
||||
} {1 {Error: unknown command or invalid arguments: "import". Enter ".help" for help}}
|
||||
} {1 {Usage: .import FILE TABLE}}
|
||||
|
||||
# .separator STRING Change separator used by output mode and .import
|
||||
do_test shell1-1.2.1 {
|
||||
do_test shell5-1.2.1 {
|
||||
catchcmd "test.db" ".separator"
|
||||
} {1 {Error: unknown command or invalid arguments: "separator". Enter ".help" for help}}
|
||||
do_test shell1-1.2.2 {
|
||||
} {1 {Usage: .separator STRING}}
|
||||
do_test shell5-1.2.2 {
|
||||
catchcmd "test.db" ".separator FOO"
|
||||
} {0 {}}
|
||||
do_test shell1-1.2.3 {
|
||||
do_test shell5-1.2.3 {
|
||||
# too many arguments
|
||||
catchcmd "test.db" ".separator FOO BAD"
|
||||
} {1 {Error: unknown command or invalid arguments: "separator". Enter ".help" for help}}
|
||||
} {1 {Usage: .separator STRING}}
|
||||
|
||||
# separator should default to "|"
|
||||
do_test shell5-1.3.1 {
|
||||
|
Reference in New Issue
Block a user