diff options
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/autovacuum_ioerr.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/autovacuum_ioerr.test | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/autovacuum_ioerr.test b/libraries/sqlite/unix/sqlite-3.5.1/test/autovacuum_ioerr.test new file mode 100644 index 0000000..7e01cb2 --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/autovacuum_ioerr.test | |||
@@ -0,0 +1,58 @@ | |||
1 | # 2001 September 15 | ||
2 | # | ||
3 | # The author disclaims copyright to this source code. In place of | ||
4 | # a legal notice, here is a blessing: | ||
5 | # | ||
6 | # May you do good and not evil. | ||
7 | # May you find forgiveness for yourself and forgive others. | ||
8 | # May you share freely, never taking more than you give. | ||
9 | # | ||
10 | #*********************************************************************** | ||
11 | # | ||
12 | # This file runs the tests in the file ioerr.test with auto-vacuum enabled | ||
13 | # databases. | ||
14 | # | ||
15 | # $Id: autovacuum_ioerr.test,v 1.3 2006/01/16 12:46:41 danielk1977 Exp $ | ||
16 | |||
17 | set testdir [file dirname $argv0] | ||
18 | source $testdir/tester.tcl | ||
19 | |||
20 | # If this build of the library does not support auto-vacuum, omit this | ||
21 | # whole file. | ||
22 | ifcapable {!autovacuum} { | ||
23 | finish_test | ||
24 | return | ||
25 | } | ||
26 | |||
27 | rename finish_test really_finish_test2 | ||
28 | proc finish_test {} {} | ||
29 | set ISQUICK 1 | ||
30 | |||
31 | rename sqlite3 real_sqlite3 | ||
32 | proc sqlite3 {args} { | ||
33 | set r [eval "real_sqlite3 $args"] | ||
34 | if { [llength $args] == 2 } { | ||
35 | [lindex $args 0] eval {pragma auto_vacuum = 1} | ||
36 | } | ||
37 | set r | ||
38 | } | ||
39 | |||
40 | rename do_test really_do_test | ||
41 | proc do_test {args} { | ||
42 | set sc [concat really_do_test "autovacuum-[lindex $args 0]" \ | ||
43 | [lrange $args 1 end]] | ||
44 | eval $sc | ||
45 | } | ||
46 | |||
47 | source $testdir/ioerr.test | ||
48 | |||
49 | rename sqlite3 "" | ||
50 | rename real_sqlite3 sqlite3 | ||
51 | rename finish_test "" | ||
52 | rename really_finish_test2 finish_test | ||
53 | rename do_test "" | ||
54 | rename really_do_test do_test | ||
55 | finish_test | ||
56 | |||
57 | |||
58 | |||