Fix minor problems in tcl test scripts.

FossilOrigin-Name: 56b664185e3e56ad22e0c16a5b946fc8204d4d33221b6b4269d6d650dfd9969c
This commit is contained in:
dan
2019-04-12 12:10:03 +00:00
parent 9b475e65a1
commit 150dfbd2c8
6 changed files with 40 additions and 29 deletions
+6 -4
View File
@@ -99,8 +99,9 @@ do_execsql_test 4.1.2 {
COMMIT;
}
do_execsql_test 4.1.3 {
SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
SELECT type, name, tbl_name, sql
FROM sqlite_master WHERE type='table' AND name!='t1';
} {table t3 t3 {CREATE TABLE t3(e, f)}}
do_catchsql_test 4.2.1 {
@@ -111,8 +112,9 @@ do_execsql_test 4.2.2 {
COMMIT;
}
do_execsql_test 4.2.3 {
SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
SELECT type, name, tbl_name, sql
FROM sqlite_master WHERE type='table' AND name!='t1';
} {table t3 t3 {CREATE TABLE t3(e, f)}}
#-------------------------------------------------------------------------
reset_db
+2 -1
View File
@@ -97,7 +97,8 @@ do_test corruptC-2.1 {
sqlite3 db test.db
catchsql {PRAGMA integrity_check}
} {1 {database disk image is malformed}}
} {0 {{*** in database main ***
Page 3: free space corruption}}}
# test that a corrupt content offset size is handled (seed 5649)
#
+15 -13
View File
@@ -186,19 +186,21 @@ do_test 620 {
} {1 {wrong # args: should be "db serialize ?DATABASE?"}}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 700 {
CREATE TABLE t1(a, b);
PRAGMA schema_version = 0;
}
do_test 710 {
set ser [db serialize main]
db close
sqlite3 db
db deserialize main $ser
catchsql {
CREATE VIRTUAL TABLE t1 USING rtree(id, a, b, c, d);
ifcapable vtab {
reset_db
do_execsql_test 700 {
CREATE TABLE t1(a, b);
PRAGMA schema_version = 0;
}
} {1 {table t1 already exists}}
do_test 710 {
set ser [db serialize main]
db close
sqlite3 db
db deserialize main $ser
catchsql {
CREATE VIRTUAL TABLE t1 USING rtree(id, a, b, c, d);
}
} {1 {table t1 already exists}}
}
finish_test
+7
View File
@@ -174,6 +174,7 @@ do_test 4.3.4 {
execsql { DROP INDEX i1 } db3
execsql { DROP INDEX i2 } db2
} {}
if {[permutation]=="prepare"} { catchsql { SELECT * FROM sqlite_master } }
ifcapable vtab {
do_execsql_test 4.3.5 { SELECT * FROM pragma_index_info('i1') }
do_execsql_test 4.3.6 { SELECT * FROM pragma_index_info('i2') }
@@ -192,6 +193,9 @@ do_test 4.4.3 {
execsql { DROP INDEX i1 } db3
execsql { DROP INDEX i2 } db2
} {}
if {[permutation]=="prepare"} {
catchsql { SELECT * FROM sqlite_master, aux.sqlite_master }
}
ifcapable vtab {
do_execsql_test 4.4.5 { SELECT * FROM pragma_index_list('t1') } {}
do_execsql_test 4.4.6 { SELECT * FROM pragma_index_list('t2') } {}
@@ -216,6 +220,9 @@ do_test 4.5.3 {
execsql { DROP TABLE c1 } db3
execsql { DROP TABLE c2 } db2
} {}
if {[permutation]=="prepare"} {
catchsql { SELECT * FROM sqlite_master, aux.sqlite_master }
}
ifcapable vtab {
do_execsql_test 4.5.4 { SELECT * FROM pragma_foreign_key_list('c1') }
do_execsql_test 4.5.5 { SELECT * FROM pragma_foreign_key_list('c2') }