3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #*************************************************************************
12 # Tests for the secure_delete pragma.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
18 unset -nocomplain DEFAULT_SECDEL
20 ifcapable fast_secure_delete {
23 ifcapable secure_delete {
29 do_test securedel-1.0 {
30 db eval {PRAGMA secure_delete;}
33 forcedelete test2.db test2.db-journal
34 do_test securedel-1.1 {
36 ATTACH 'test2.db' AS db2;
37 PRAGMA main.secure_delete=ON;
38 PRAGMA db2.secure_delete;
40 } [list 1 $DEFAULT_SECDEL]
41 do_test securedel-1.2 {
43 PRAGMA main.secure_delete=OFF;
44 PRAGMA db2.secure_delete;
46 } [list 0 $DEFAULT_SECDEL]
47 do_test securedel-1.3 {
49 PRAGMA secure_delete=OFF;
50 PRAGMA db2.secure_delete;
53 do_test securedel-1.4 {
55 PRAGMA secure_delete=ON;
56 PRAGMA db2.secure_delete;
59 do_test securedel-1.5 {
61 PRAGMA secure_delete=FAST;
62 PRAGMA db2.secure_delete;
65 do_test securedel-1.6 {
67 PRAGMA secure_delete=ON;
68 PRAGMA db2.secure_delete;
71 do_test securedel-1.7 {
73 PRAGMA main.secure_delete=FAST;
74 PRAGMA db2.secure_delete;
77 do_test securedel-1.8 {
79 PRAGMA main.secure_delete=ON;
80 PRAGMA db2.secure_delete;
84 do_test securedel-2.1 {
87 ATTACH 'test2.db' AS db2;
88 PRAGMA db2.secure_delete;
91 do_test securedel-2.2 {
94 PRAGMA main.secure_delete=OFF;
95 ATTACH 'test2.db' AS db2;
96 PRAGMA db2.secure_delete;