diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ioerr.test | 46 | ||||
-rw-r--r-- | test/pager.test | 8 |
2 files changed, 33 insertions, 21 deletions
diff --git a/test/ioerr.test b/test/ioerr.test index 9daaf94bd..104dac37c 100644 --- a/test/ioerr.test +++ b/test/ioerr.test @@ -15,7 +15,7 @@ # The tests in this file use special facilities that are only # available in the SQLite test fixture. # -# $Id: ioerr.test,v 1.15 2005/01/16 11:07:07 danielk1977 Exp $ +# $Id: ioerr.test,v 1.16 2005/01/19 03:47:16 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -256,25 +256,31 @@ if {$tcl_platform(platform)=="unix" && [file exists ./crashtest]} { # Test handling of IO errors that occur while rolling back hot journal # files. -do_ioerr_test 7 -tclprep { - db close - sqlite3 db2 test2.db - db2 eval { - PRAGMA synchronous = 0; - CREATE TABLE t1(a, b); - INSERT INTO t1 VALUES(1, 2); - BEGIN; - INSERT INTO t1 VALUES(3, 4); - } - file copy -force test2.db test.db - file copy -force test2.db-journal test.db-journal - db2 close -} -tclbody { - sqlite3 db test.db - db eval { - SELECT * FROM t1; - } -} -exclude 1 +# +# These tests can't be run on windows because the windows version of +# SQLite holds a mandatory exclusive lock on journal files it has open. +# +if {$tcl_platform(platform)!="windows"} { + do_ioerr_test 7 -tclprep { + db close + sqlite3 db2 test2.db + db2 eval { + PRAGMA synchronous = 0; + CREATE TABLE t1(a, b); + INSERT INTO t1 VALUES(1, 2); + BEGIN; + INSERT INTO t1 VALUES(3, 4); + } + file copy -force test2.db test.db + file copy -force test2.db-journal test.db-journal + db2 close + } -tclbody { + sqlite3 db test.db + db eval { + SELECT * FROM t1; + } + } -exclude 1 +} # do_ioerr_test 15 -sqlprep { # CREATE TABLE abc(a UNIQUE, b, c); diff --git a/test/pager.test b/test/pager.test index 596f363ff..6b6cfdcd1 100644 --- a/test/pager.test +++ b/test/pager.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is page cache subsystem. # -# $Id: pager.test,v 1.20 2005/01/17 07:53:44 danielk1977 Exp $ +# $Id: pager.test,v 1.21 2005/01/19 03:47:16 danielk1977 Exp $ set testdir [file dirname $argv0] @@ -445,6 +445,11 @@ do_test pager-5.1 { } {} } +# The following tests cover rolling back hot journal files. +# They can't be run on windows because the windows version of +# SQLite holds a mandatory exclusive lock on journal files it has open. +# +if {$tcl_platform(platform)!="windows"} { do_test pager-6.1 { file delete -force test2.db file delete -force test2.db-journal @@ -514,6 +519,7 @@ do_test pager-6.3 { do_test pager-6.4 { db2 close } {} +} finish_test |