diff options
Diffstat (limited to 'test/misc2.test')
-rw-r--r-- | test/misc2.test | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/test/misc2.test b/test/misc2.test index ae503f785..6a22b613a 100644 --- a/test/misc2.test +++ b/test/misc2.test @@ -13,7 +13,7 @@ # This file implements tests for miscellanous features that were # left out of other test files. # -# $Id: misc2.test,v 1.18 2004/11/22 15:05:59 danielk1977 Exp $ +# $Id: misc2.test,v 1.19 2005/01/20 02:17:02 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -166,29 +166,33 @@ do_test misc2-7.2 { } msg] lappend rc $msg } {1 {database table is locked}} -do_test misc2-7.3 { - db close - file delete -force test.db - sqlite3 db :memory: - execsql { - CREATE TABLE t1(x); - INSERT INTO t1 VALUES(1); - } - set rc [catch { - db eval {SELECT rowid FROM t1} {} { - db eval "DELETE FROM t1 WHERE rowid=$rowid" +ifcapable memorydb { + do_test misc2-7.3 { + sqlite3 db :memory: + execsql { + CREATE TABLE t1(x); + INSERT INTO t1 VALUES(1); } - } msg] - lappend rc $msg -} {1 {database table is locked}} -do_test misc2-7.4 { - set rc [catch { - db eval {SELECT rowid FROM t1} {} { - db eval "INSERT INTO t1 VALUES(3)" - } - } msg] - lappend rc $msg -} {1 {database table is locked}} + set rc [catch { + db eval {SELECT rowid FROM t1} {} { + db eval "DELETE FROM t1 WHERE rowid=$rowid" + } + } msg] + lappend rc $msg + } {1 {database table is locked}} + do_test misc2-7.4 { + set rc [catch { + db eval {SELECT rowid FROM t1} {} { + db eval "INSERT INTO t1 VALUES(3)" + } + } msg] + lappend rc $msg + } {1 {database table is locked}} +} + +db close +file delete -force test.db +sqlite3 db test.db # Ticket #453. If the SQL ended with "-", the tokenizer was calling that # an incomplete token, which caused problem. The solution was to just call |