1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix some test scripts so that they work with a minimal build configuration. (CVS 2241)

FossilOrigin-Name: d267fb3ca3f31ee138c9613cb84e873ede7f141a
This commit is contained in:
danielk1977
2005-01-20 02:17:01 +00:00
parent 1bd3644f27
commit 4489f9bdec
11 changed files with 136 additions and 113 deletions

View File

@ -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