Fix the "sqlite3" command in the TCL interface so that it correctly returns

an error if invoked with no arguments.

FossilOrigin-Name: 8a82fcf05fa84def1433489f71dc28b47c1e082d044512b8756ec1bb4b913fab
This commit is contained in:
drh
2018-09-24 19:21:46 +00:00
parent 8f25fe573b
commit 579e80cd2f
4 changed files with 17 additions and 9 deletions
+7
View File
@@ -17,6 +17,8 @@
#
# $Id: tclsqlite.test,v 1.73 2009/03/16 13:19:36 danielk1977 Exp $
catch {sqlite3}
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -31,6 +33,11 @@ do_test tcl-1.1 {
regsub {really_sqlite3} $msg {sqlite3} msg
lappend v $msg
} [list 1 "wrong # args: should be \"$r\""]
do_test tcl-1.1.1 {
set v [catch {sqlite3} msg]
regsub {really_sqlite3} $msg {sqlite3} msg
lappend v $msg
} [list 1 "wrong # args: should be \"$r\""]
do_test tcl-1.2 {
set v [catch {db bogus} msg]
lappend v $msg