OLD | NEW |
1 # 2010 September 1 | 1 # 2010 September 1 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
11 # | 11 # |
12 | 12 |
13 set testdir [file dirname $argv0] | 13 set testdir [file dirname $argv0] |
14 source $testdir/tester.tcl | 14 source $testdir/tester.tcl |
15 | 15 |
16 # If SQLITE_CURDIR is not defined, omit this file. | 16 # If SQLITE_CURDIR is not defined, omit this file. |
17 ifcapable !curdir { | 17 ifcapable !curdir { |
18 finish_test | 18 finish_test |
19 return | 19 return |
20 } | 20 } |
21 | 21 |
22 source $testdir/malloc_common.tcl | 22 source $testdir/malloc_common.tcl |
23 | 23 |
| 24 forcedelete bak.db |
24 unset -nocomplain defaultVfs | 25 unset -nocomplain defaultVfs |
25 set defaultVfs [file_control_vfsname db] | 26 set defaultVfs [file_control_vfsname db] |
26 db close | 27 db close |
27 | 28 |
28 do_test quota-1.1 { sqlite3_quota_initialize nosuchvfs 1 } {SQLITE_ERROR} | 29 do_test quota-1.1 { sqlite3_quota_initialize nosuchvfs 1 } {SQLITE_ERROR} |
29 do_test quota-1.2 { sqlite3_quota_initialize "" 1 } {SQLITE_OK} | 30 do_test quota-1.2 { sqlite3_quota_initialize "" 1 } {SQLITE_OK} |
30 do_test quota-1.3 { sqlite3_quota_initialize "" 1 } {SQLITE_MISUSE} | 31 do_test quota-1.3 { sqlite3_quota_initialize "" 1 } {SQLITE_MISUSE} |
31 do_test quota-1.4 { sqlite3_quota_shutdown } {SQLITE_OK} | 32 do_test quota-1.4 { sqlite3_quota_shutdown } {SQLITE_OK} |
32 | 33 |
33 do_test quota-1.5 { sqlite3_quota_initialize "" 0 } {SQLITE_OK} | 34 do_test quota-1.5 { sqlite3_quota_initialize "" 0 } {SQLITE_OK} |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 } | 520 } |
520 | 521 |
521 do_faultsim_test quota-5.6 -prep { | 522 do_faultsim_test quota-5.6 -prep { |
522 catch { sqlite3_quota_shutdown } | 523 catch { sqlite3_quota_shutdown } |
523 sqlite3_quota_initialize "" 1 | 524 sqlite3_quota_initialize "" 1 |
524 } -body { | 525 } -body { |
525 sqlite3_quota_set * 4096 {} | 526 sqlite3_quota_set * 4096 {} |
526 } | 527 } |
527 | 528 |
528 catch { sqlite3_quota_shutdown } | 529 catch { sqlite3_quota_shutdown } |
| 530 catch { db close } |
| 531 forcedelete test.db |
529 finish_test | 532 finish_test |
OLD | NEW |