Index: third_party/sqlite/src/test/corruptB.test |
diff --git a/third_party/sqlite/src/test/corruptB.test b/third_party/sqlite/src/test/corruptB.test |
index 4aa1d010ce117243337d13464175de3fb5326f2f..c51cb5768026d0698b6d2d24211bdc8c3ed9d53b 100644 |
--- a/third_party/sqlite/src/test/corruptB.test |
+++ b/third_party/sqlite/src/test/corruptB.test |
@@ -30,6 +30,10 @@ source $testdir/tester.tcl |
# |
do_not_use_codec |
+# These tests deal with corrupt database files |
+# |
+database_may_be_corrupt |
+ |
do_test corruptB-1.1 { |
execsql { |
@@ -46,7 +50,7 @@ do_test corruptB-1.1 { |
} {1} |
integrity_check corruptB-1.2 |
-file copy -force test.db bak.db |
+forcecopy test.db bak.db |
# Set the right-child of a B-Tree rootpage to refer to the root-page itself. |
# |
@@ -65,7 +69,7 @@ do_test corruptB-1.3.2 { |
# |
do_test corruptB-1.4.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
set cell_offset [hexio_get_int [hexio_read test.db [expr $offset+12] 2]] |
hexio_write test.db [expr $offset+$cell_offset] [hexio_render_int32 $::root] |
} {4} |
@@ -78,7 +82,7 @@ do_test corruptB-1.4.2 { |
# |
do_test corruptB-1.5.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
sqlite3 db test.db |
execsql { |
INSERT INTO t1 SELECT randomblob(200) FROM t1; |
@@ -91,7 +95,7 @@ do_test corruptB-1.5.1 { |
} |
} {} |
-file copy -force test.db bak.db |
+forcecopy test.db bak.db |
# Set the right-child pointer of the right-child of the root page to point |
# back to the root page. |
@@ -112,7 +116,7 @@ do_test corruptB-1.6.2 { |
# |
do_test corruptB-1.7.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
set cell_offset [hexio_get_int [hexio_read test.db [expr $c_offset+12] 2]] |
hexio_write test.db [expr $c_offset+$cell_offset] [hexio_render_int32 $::root] |
} {4} |
@@ -140,7 +144,7 @@ do_test corruptB-1.8.2 { |
# |
do_test corruptB-1.9.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
set cell_offset [hexio_get_int [hexio_read test.db [expr $c_offset+12] 2]] |
hexio_write test.db [expr $c_offset+$cell_offset] [hexio_render_int32 $::root] |
} {4} |
@@ -153,7 +157,7 @@ do_test corruptB-1.9.2 { |
do_test corruptB-2.1.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
hexio_write test.db [expr $offset+8] [hexio_render_int32 0x6FFFFFFF] |
} {4} |
do_test corruptB-2.1.2 { |
@@ -167,7 +171,7 @@ do_test corruptB-2.1.2 { |
# |
do_test corruptB-3.1.1 { |
db close |
- file copy -force bak.db test.db |
+ forcecopy bak.db test.db |
sqlite3 db test.db |
set v [string repeat abcdefghij 200] |
execsql { |