Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: third_party/sqlite/src/test/incrblobfault.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/incrblob_err.test ('k') | third_party/sqlite/src/test/incrcorrupt.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698