diff options
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/onefile.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/onefile.test | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/onefile.test b/libraries/sqlite/unix/sqlite-3.5.1/test/onefile.test new file mode 100644 index 0000000..8c1ba12 --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/onefile.test | |||
@@ -0,0 +1,61 @@ | |||
1 | # | ||
2 | # May you do good and not evil. | ||
3 | # May you find forgiveness for yourself and forgive others. | ||
4 | # May you share freely, never taking more than you give. | ||
5 | # | ||
6 | #*********************************************************************** | ||
7 | # This file runs all tests. | ||
8 | # | ||
9 | # $Id: onefile.test,v 1.2 2007/10/03 08:46:45 danielk1977 Exp $ | ||
10 | |||
11 | set testdir [file dirname $argv0] | ||
12 | source $testdir/tester.tcl | ||
13 | rename finish_test really_finish_test2 | ||
14 | proc finish_test {} { | ||
15 | catch {db close} | ||
16 | catch {db2 close} | ||
17 | catch {db3 close} | ||
18 | } | ||
19 | set ISQUICK 1 | ||
20 | |||
21 | set INCLUDE { | ||
22 | conflict.test | ||
23 | insert.test | ||
24 | insert2.test | ||
25 | insert3.test | ||
26 | rollback.test | ||
27 | select1.test | ||
28 | select2.test | ||
29 | select3.test | ||
30 | temptable.test | ||
31 | } | ||
32 | #set INCLUDE insert2.test | ||
33 | |||
34 | rename sqlite3 really_sqlite3 | ||
35 | proc sqlite3 {args} { | ||
36 | if {[string range [lindex $args 0] 0 0] ne "-"} { | ||
37 | lappend args -vfs fs | ||
38 | } | ||
39 | uplevel [concat really_sqlite3 $args] | ||
40 | } | ||
41 | |||
42 | rename do_test really_do_test | ||
43 | proc do_test {name args} { | ||
44 | uplevel really_do_test onefile-$name $args | ||
45 | } | ||
46 | |||
47 | foreach testfile [lsort -dictionary [glob $testdir/*.test]] { | ||
48 | set tail [file tail $testfile] | ||
49 | if {[lsearch -exact $INCLUDE $tail]<0} continue | ||
50 | source $testfile | ||
51 | } | ||
52 | |||
53 | file delete -force test.db test2.db test3.db test4.db | ||
54 | |||
55 | really_finish_test2 | ||
56 | rename do_test {} | ||
57 | rename really_do_test do_test | ||
58 | rename finish_test {} | ||
59 | rename really_finish_test2 finish_test | ||
60 | rename sqlite3 {} | ||
61 | rename really_sqlite3 sqlite3 | ||