OLD | NEW |
1 # 2009 February 4 | 1 # 2009 February 4 |
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 # This file implements regression tests for SQLite library. The | 11 # This file implements regression tests for SQLite library. The |
12 # focus of this file is testing the "backup" and "restore" methods | 12 # focus of this file is testing the "backup" and "restore" methods |
13 # of the TCL interface - methods which are based on the | 13 # of the TCL interface - methods which are based on the |
14 # sqlite3_backup_XXX API. | 14 # sqlite3_backup_XXX API. |
15 # | 15 # |
16 # $Id: backup2.test,v 1.4 2009/04/07 14:14:23 danielk1977 Exp $ | 16 # $Id: backup2.test,v 1.4 2009/04/07 14:14:23 danielk1977 Exp $ |
17 | 17 |
18 set testdir [file dirname $argv0] | 18 set testdir [file dirname $argv0] |
19 source $testdir/tester.tcl | 19 source $testdir/tester.tcl |
20 | 20 |
| 21 do_not_use_codec |
| 22 |
21 ifcapable !trigger||!view { finish_test ; return } | 23 ifcapable !trigger||!view { finish_test ; return } |
22 | 24 |
23 # Fill a database with test data. | 25 # Fill a database with test data. |
24 # | 26 # |
25 do_test backup2-1 { | 27 do_test backup2-1 { |
26 db eval { | 28 db eval { |
27 CREATE TABLE t1(x); | 29 CREATE TABLE t1(x); |
28 INSERT INTO t1 VALUES(randstr(8000,8000)); | 30 INSERT INTO t1 VALUES(randstr(8000,8000)); |
29 INSERT INTO t1 VALUES(randstr(8000,8000)); | 31 INSERT INTO t1 VALUES(randstr(8000,8000)); |
30 INSERT INTO t1 VALUES(randstr(8000,8000)); | 32 INSERT INTO t1 VALUES(randstr(8000,8000)); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 # Invalid syntax on the restore method | 180 # Invalid syntax on the restore method |
179 # | 181 # |
180 do_test backup2-14 { | 182 do_test backup2-14 { |
181 set rc [catch {db restore} res] | 183 set rc [catch {db restore} res] |
182 lappend rc $res | 184 lappend rc $res |
183 } {1 {wrong # args: should be "db restore ?DATABASE? FILENAME"}} | 185 } {1 {wrong # args: should be "db restore ?DATABASE? FILENAME"}} |
184 | 186 |
185 file delete -force bu1.db bu2.db bu3.db bu4.db | 187 file delete -force bu1.db bu2.db bu3.db bu4.db |
186 | 188 |
187 finish_test | 189 finish_test |
OLD | NEW |