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

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

Issue 2765553002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: 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 # 2009 August 20 1 # 2009 August 20
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. 11 # This file implements regression tests for SQLite library.
12 # 12 #
13 # This file implements tests to verify that ticket #4018 has been 13 # This file implements tests to verify that ticket #4018 has been
14 # fixed. 14 # fixed.
15 # 15 #
16 16
17 set testdir [file dirname $argv0] 17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl 18 source $testdir/tester.tcl
19 do_not_use_codec
19 20
20 proc testsql {sql} { 21 proc testsql {sql} {
21 set fd [open tf_main.tcl w] 22 set fd [open tf_main.tcl w]
22 puts $fd [subst -nocommands { 23 puts $fd [subst -nocommands {
23 sqlite3_test_control_pending_byte 0x0010000 24 sqlite3_test_control_pending_byte 0x0010000
24 sqlite3 db test.db 25 sqlite3 db test.db
25 set rc [catch { db eval {$sql} } msg] 26 set rc [catch { db eval {$sql} } msg]
26 puts -nonewline "[set rc] {[set msg]}" 27 puts -nonewline "[set rc] {[set msg]}"
27 flush stdout 28 flush stdout
28 exit 29 exit
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } {1 2 3 4} 81 } {1 2 3 4}
81 do_test tkt4018-2.3 { 82 do_test tkt4018-2.3 {
82 db2 close 83 db2 close
83 sqlite3 db2 test.db -readonly 1 84 sqlite3 db2 test.db -readonly 1
84 execsql COMMIT 85 execsql COMMIT
85 catchsql {INSERT INTO t1 VALUES(5, 6)} db2 86 catchsql {INSERT INTO t1 VALUES(5, 6)} db2
86 } {1 {attempt to write a readonly database}} 87 } {1 {attempt to write a readonly database}}
87 db2 close 88 db2 close
88 89
89 finish_test 90 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698