Test scripts revised to work when auto_vacuum defaults on. (CVS 5528)

FossilOrigin-Name: e63186b0b6defce9ce16b3c334887c1f5a0bfcf0
This commit is contained in:
drh
2008-08-02 20:09:36 +00:00
parent a68468f5b1
commit e6a6464895
5 changed files with 26 additions and 20 deletions
+4 -4
View File
@@ -13,7 +13,7 @@
# The focus of this file is testing how SQLite generates the names
# of columns in a result set.
#
# $Id: colname.test,v 1.3 2008/07/23 20:28:14 drh Exp $
# $Id: colname.test,v 1.4 2008/08/02 20:09:37 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -250,9 +250,9 @@ do_test colname-4.13 {
# ticket #3229
do_test colname-5.1 {
db eval {
lreplace [db eval {
SELECT x.* FROM sqlite_master X LIMIT 1;
}
} {table tabc tabc 2 {CREATE TABLE tabc(a,b,c)}}
}] 3 3 x
} {table tabc tabc x {CREATE TABLE tabc(a,b,c)}}
finish_test
+5 -1
View File
@@ -13,7 +13,7 @@
# This file implements tests to make sure SQLite does not crash or
# segfault if it sees a corrupt database file.
#
# $Id: corrupt2.test,v 1.13 2008/07/08 17:13:59 danielk1977 Exp $
# $Id: corrupt2.test,v 1.14 2008/08/02 20:09:37 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -23,6 +23,8 @@ source $testdir/tester.tcl
#
do_test corrupt2-1.1 {
execsql {
PRAGMA auto_vacuum=0;
PRAGMA page_size=1024;
CREATE TABLE abc(a, b, c);
}
} {}
@@ -183,6 +185,7 @@ do_test corrupt2-5.1 {
sqlite3 db2 corrupt.db
execsql {
PRAGMA auto_vacuum = 0;
PRAGMA page_size = 1024;
CREATE TABLE t1(a, b, c);
CREATE TABLE t2(a, b, c);
@@ -338,6 +341,7 @@ ifcapable autovacuum {
set sqlprep {
PRAGMA auto_vacuum = 0;
PRAGMA page_size = 1024;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
CREATE INDEX i1 ON t1(b);
+7 -5
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The focus
# of these tests is the journal mode pragma.
#
# $Id: jrnlmode.test,v 1.4 2008/06/04 06:46:00 danielk1977 Exp $
# $Id: jrnlmode.test,v 1.5 2008/08/02 20:09:37 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -364,8 +364,9 @@ ifcapable pragma {
} {1}
do_test jrnlmode-5.17 {
execsql COMMIT
file size test3.db-journal
} $journalsize
set sz [file size test3.db-journal]
expr {$sz>=$journalsize}
} {1}
do_test jrnlmode-5.18 {
execsql {
@@ -378,8 +379,9 @@ ifcapable pragma {
} {1}
do_test jrnlmode-5.19 {
execsql COMMIT
file size test.db-journal
} $journalsize
set sz [file size test.db-journal]
expr {$sz>=$journalsize}
} {1}
}
finish_test