diff options
Diffstat (limited to 'test/bind.test')
-rw-r--r-- | test/bind.test | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/bind.test b/test/bind.test index 85bebfbc3..361fff850 100644 --- a/test/bind.test +++ b/test/bind.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the sqlite_bind API. # -# $Id: bind.test,v 1.24 2005/01/11 16:54:15 drh Exp $ +# $Id: bind.test,v 1.25 2005/01/11 17:46:42 drh Exp $ # set testdir [file dirname $argv0] @@ -104,12 +104,13 @@ ifcapable {tclvar} { execsql { DELETE FROM t1; } - set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES($one,$::two,${x})} -1 TX] + set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES($one,$::two,${x{y}z})}\ + -1 TX] set TX } {} set v1 {$one} set v2 {$::two} - set v3 {${x}} + set v3 {${x{y}z}} } ifcapable {!tclvar} { do_test bind-2.1 { @@ -491,4 +492,11 @@ do_test bind-10.16 { } :pqr catch {sqlite3_finalize $VM} +# Make sure we catch an unterminated "(" in a Tcl-style variable name +# +do_test bind-11.1 { + catchsql {SELECT * FROM sqlite_master WHERE name=$abc(123 and sql NOT NULL;} +} {1 {unrecognized token: "$abc(123"}} + + finish_test |