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 #***********************************************************************
13 source [file join [file dirname [info script]] rbu_common.tcl]
14 if_no_rbu_support { finish_test ; return }
15 set ::testprefix rbupass
17 if {[info commands register_demovfs]==""} {
25 sqlite3rbu_create_vfs myvfs demo
27 sqlite3 db file:test.db?vfs=myvfs -uri 1
29 CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
30 INSERT INTO t1 VALUES(1, 2);
34 if {[permutation]!="inmemory_journal"} {
36 PRAGMA journal_mode = wal;
48 CREATE TABLE data_t1(a, b, rbu_control);
49 INSERT INTO data_t1 VALUES(2, 4, 0);
55 sqlite3rbu rbu test.db rbu.db
61 list [catch { rbu close } msg] $msg
62 } {1 {SQLITE_CANTOPEN - unable to open database file}}
65 sqlite3rbu_vacuum rbu test.db
77 sqlite3rbu_destroy_vfs myvfs