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

Side by Side Diff: third_party/sqlite/src/test/incrblob_err.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 # 2007 May 1 1 # 2007 May 1
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 # 11 #
12 # $Id: incrblob_err.test,v 1.14 2008/07/18 17:16:27 drh Exp $ 12 # $Id: incrblob_err.test,v 1.14 2008/07/18 17:16:27 drh Exp $
13 # 13 #
14 14
15 set testdir [file dirname $argv0] 15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl 16 source $testdir/tester.tcl
17 set ::testprefix incrblob_err 17 set ::testprefix incrblob_err
18 18
19 ifcapable {!incrblob || !memdebug || !tclvar} { 19 ifcapable {!incrblob || !memdebug || !tclvar} {
20 finish_test 20 finish_test
21 return 21 return
22 } 22 }
23 23
24 source $testdir/malloc_common.tcl 24 source $testdir/malloc_common.tcl
25 25
26 unset -nocomplain ::fd ::data 26 unset -nocomplain ::fd ::data
27 set ::fd [open [info script]] 27 set ::fd [open $::cmdlinearg(INFO_SCRIPT)]
28 set ::data [read $::fd] 28 set ::data [read $::fd]
29 close $::fd 29 close $::fd
30 30
31 do_malloc_test 1 -tclprep { 31 do_malloc_test 1 -tclprep {
32 set bytes [file size [info script]] 32 set bytes [file size $::cmdlinearg(INFO_SCRIPT)]
33 execsql { 33 execsql {
34 CREATE TABLE blobs(k, v BLOB); 34 CREATE TABLE blobs(k, v BLOB);
35 INSERT INTO blobs VALUES(1, zeroblob($::bytes)); 35 INSERT INTO blobs VALUES(1, zeroblob($::bytes));
36 } 36 }
37 } -tclbody { 37 } -tclbody {
38 set ::blob [db incrblob blobs v 1] 38 set ::blob [db incrblob blobs v 1]
39 fconfigure $::blob -translation binary 39 fconfigure $::blob -translation binary
40 set rc [catch {puts -nonewline $::blob $::data}] 40 set rc [catch {puts -nonewline $::blob $::data}]
41 if {$rc} { error "out of memory" } 41 if {$rc} { error "out of memory" }
42 } 42 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 # 131 #
132 sqlite3 db2 test.db 132 sqlite3 db2 test.db
133 set ::blob [db2 incrblob blobs v 1] 133 set ::blob [db2 incrblob blobs v 1]
134 sqlite3_blob_write $::blob [expr 500*1020-20] 12345678900987654321 134 sqlite3_blob_write $::blob [expr 500*1020-20] 12345678900987654321
135 close $::blob 135 close $::blob
136 } 136 }
137 137
138 catch {db2 close} 138 catch {db2 close}
139 139
140 finish_test 140 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/incrblob4.test ('k') | third_party/sqlite/src/test/incrblobfault.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698