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 secure_delete {
25 do_test securedel-1.0 {
26 db eval {PRAGMA secure_delete;}
29 forcedelete test2.db test2.db-journal
30 do_test securedel-1.1 {
32 ATTACH 'test2.db' AS db2;
33 PRAGMA main.secure_delete=ON;
34 PRAGMA db2.secure_delete;
36 } [list 1 $DEFAULT_SECDEL]
37 do_test securedel-1.2 {
39 PRAGMA main.secure_delete=OFF;
40 PRAGMA db2.secure_delete;
42 } [list 0 $DEFAULT_SECDEL]
43 do_test securedel-1.3 {
45 PRAGMA secure_delete=OFF;
46 PRAGMA db2.secure_delete;
49 do_test securedel-1.4 {
51 PRAGMA secure_delete=ON;
52 PRAGMA db2.secure_delete;
56 do_test securedel-2.1 {
59 ATTACH 'test2.db' AS db2;
60 PRAGMA db2.secure_delete;
63 do_test securedel-2.2 {
66 PRAGMA main.secure_delete=OFF;
67 ATTACH 'test2.db' AS db2;
68 PRAGMA db2.secure_delete;