OLD | NEW |
1 # 2010 October 26 | 1 # 2010 October 26 |
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 #*********************************************************************** |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 do_faultsim_test 2 -prep { | 47 do_faultsim_test 2 -prep { |
48 sqlite3 db test.db | 48 sqlite3 db test.db |
49 set ::blob [db incrblob blob v 1] | 49 set ::blob [db incrblob blob v 1] |
50 } -body { | 50 } -body { |
51 if {[catch {sqlite3_blob_reopen $::blob -1}]} { | 51 if {[catch {sqlite3_blob_reopen $::blob -1}]} { |
52 error [sqlite3_errmsg db] | 52 error [sqlite3_errmsg db] |
53 } | 53 } |
54 } -test { | 54 } -test { |
55 faultsim_test_result {1 {no such rowid: -1}} | 55 faultsim_test_result {1 {no such rowid: -1}} {1 {disk I/O error}} |
56 close $::blob | 56 close $::blob |
57 } | 57 } |
58 | 58 |
59 do_faultsim_test 3 -prep { | 59 do_faultsim_test 3 -prep { |
60 sqlite3 db test.db | 60 sqlite3 db test.db |
61 } -body { | 61 } -body { |
62 set ::blob [db incrblob blob v 1] | 62 set ::blob [db incrblob blob v 1] |
63 gets $::blob | 63 gets $::blob |
64 } -test { | 64 } -test { |
65 faultsim_test_result {0 {hello world}} | 65 faultsim_test_result {0 {hello world}} |
66 catch { close $::blob } | 66 catch { close $::blob } |
67 } | 67 } |
68 | 68 |
69 finish_test | 69 finish_test |
OLD | NEW |