Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Test scripts revised to work when auto_vacuum defaults on. (CVS 5528) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | e63186b0b6defce9ce16b3c334887c1f |
User & Date: | drh 2008-08-02 20:09:37 |
Context
2008-08-04
| ||
01:46 | removed some extraneous blank lines. made sure to use only LF line endings. (CVS 5529) check-in: 358bd660 user: shane tags: trunk | |
2008-08-02
| ||
20:09 | Test scripts revised to work when auto_vacuum defaults on. (CVS 5528) check-in: e63186b0 user: drh tags: trunk | |
17:36 | Fix a reference count leak introduced by (5526). (CVS 5527) check-in: f653995c user: danielk1977 tags: trunk | |
Changes
Changes to test/colname.test.
9 9 # 10 10 #*********************************************************************** 11 11 # This file implements regression tests for SQLite library. 12 12 # 13 13 # The focus of this file is testing how SQLite generates the names 14 14 # of columns in a result set. 15 15 # 16 -# $Id: colname.test,v 1.3 2008/07/23 20:28:14 drh Exp $ 16 +# $Id: colname.test,v 1.4 2008/08/02 20:09:37 drh Exp $ 17 17 18 18 set testdir [file dirname $argv0] 19 19 source $testdir/tester.tcl 20 20 21 21 # Rules (applied in order): 22 22 # 23 23 # (1) If there is an AS clause, use it. ................................................................................ 246 246 execsql2 { 247 247 SELECT * FROM v6 ORDER BY 2; 248 248 } 249 249 } {v6.a 1 v6.x 4 v6.a:1 11 v6.x:1 14 v6.a:2 1 v6.b 2 v6.c 3 v6.x:2 4 v6.y 5 v6.z 6 v6.a:3 11 v6.b:1 12 v6.c:1 13 v6.x:3 14 v6.y:1 15 v6.z:1 16} 250 250 251 251 # ticket #3229 252 252 do_test colname-5.1 { 253 - db eval { 253 + lreplace [db eval { 254 254 SELECT x.* FROM sqlite_master X LIMIT 1; 255 - } 256 -} {table tabc tabc 2 {CREATE TABLE tabc(a,b,c)}} 255 + }] 3 3 x 256 +} {table tabc tabc x {CREATE TABLE tabc(a,b,c)}} 257 257 258 258 finish_test
Changes to test/corrupt2.test.
9 9 # 10 10 #*********************************************************************** 11 11 # This file implements regression tests for SQLite library. 12 12 # 13 13 # This file implements tests to make sure SQLite does not crash or 14 14 # segfault if it sees a corrupt database file. 15 15 # 16 -# $Id: corrupt2.test,v 1.13 2008/07/08 17:13:59 danielk1977 Exp $ 16 +# $Id: corrupt2.test,v 1.14 2008/08/02 20:09:37 drh Exp $ 17 17 18 18 set testdir [file dirname $argv0] 19 19 source $testdir/tester.tcl 20 20 21 21 # The following tests - corrupt2-1.* - create some databases corrupted in 22 22 # specific ways and ensure that SQLite detects them as corrupt. 23 23 # 24 24 do_test corrupt2-1.1 { 25 25 execsql { 26 + PRAGMA auto_vacuum=0; 27 + PRAGMA page_size=1024; 26 28 CREATE TABLE abc(a, b, c); 27 29 } 28 30 } {} 29 31 30 32 do_test corrupt2-1.2 { 31 33 32 34 # Corrupt the 16 byte magic string at the start of the file ................................................................................ 179 181 180 182 do_test corrupt2-5.1 { 181 183 file delete -force corrupt.db 182 184 file delete -force corrupt.db-journal 183 185 sqlite3 db2 corrupt.db 184 186 185 187 execsql { 188 + PRAGMA auto_vacuum = 0; 186 189 PRAGMA page_size = 1024; 187 190 CREATE TABLE t1(a, b, c); 188 191 CREATE TABLE t2(a, b, c); 189 192 INSERT INTO t2 VALUES(randomblob(100), randomblob(100), randomblob(100)); 190 193 INSERT INTO t2 SELECT * FROM t2; 191 194 INSERT INTO t2 SELECT * FROM t2; 192 195 INSERT INTO t2 SELECT * FROM t2; ................................................................................ 334 337 } 335 338 } {1 {database disk image is malformed}} 336 339 } 337 340 } 338 341 339 342 340 343 set sqlprep { 344 + PRAGMA auto_vacuum = 0; 341 345 PRAGMA page_size = 1024; 342 346 CREATE TABLE t1(a INTEGER PRIMARY KEY, b); 343 347 CREATE INDEX i1 ON t1(b); 344 348 INSERT INTO t1 VALUES(1, randomblob(50)); 345 349 INSERT INTO t1 SELECT NULL, randomblob(50) FROM t1; 346 350 INSERT INTO t1 SELECT NULL, randomblob(50) FROM t1; 347 351 INSERT INTO t1 SELECT NULL, randomblob(50) FROM t1;
Changes to test/jrnlmode.test.
7 7 # May you find forgiveness for yourself and forgive others. 8 8 # May you share freely, never taking more than you give. 9 9 # 10 10 #*********************************************************************** 11 11 # This file implements regression tests for SQLite library. The focus 12 12 # of these tests is the journal mode pragma. 13 13 # 14 -# $Id: jrnlmode.test,v 1.4 2008/06/04 06:46:00 danielk1977 Exp $ 14 +# $Id: jrnlmode.test,v 1.5 2008/08/02 20:09:37 drh Exp $ 15 15 16 16 set testdir [file dirname $argv0] 17 17 source $testdir/tester.tcl 18 18 19 19 ifcapable {!pager_pragmas} { 20 20 finish_test 21 21 return ................................................................................ 360 360 UPDATE t3 SET a = randomblob(1000); 361 361 } 362 362 set journalsize [file size test3.db-journal] 363 363 expr {$journalsize>30000} 364 364 } {1} 365 365 do_test jrnlmode-5.17 { 366 366 execsql COMMIT 367 - file size test3.db-journal 368 - } $journalsize 367 + set sz [file size test3.db-journal] 368 + expr {$sz>=$journalsize} 369 + } {1} 369 370 370 371 do_test jrnlmode-5.18 { 371 372 execsql { 372 373 PRAGMA journal_size_limit = -4; 373 374 BEGIN; 374 375 UPDATE t1 SET a = randomblob(1000); 375 376 } 376 377 set journalsize [file size test.db-journal] 377 378 expr {$journalsize>30000} 378 379 } {1} 379 380 do_test jrnlmode-5.19 { 380 381 execsql COMMIT 381 - file size test.db-journal 382 - } $journalsize 382 + set sz [file size test.db-journal] 383 + expr {$sz>=$journalsize} 384 + } {1} 383 385 } 384 386 385 387 finish_test