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

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/test/close.test

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 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
(Empty)
1 # 2013 May 14
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 #
12 # Test some specific circumstances to do with shared cache mode.
13 #
14
15
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 set ::testprefix close
19
20 do_execsql_test 1.0 {
21 CREATE TABLE t1(x);
22 INSERT INTO t1 VALUES('one');
23 INSERT INTO t1 VALUES('two');
24 INSERT INTO t1 VALUES('three');
25 }
26 db close
27
28 do_test 1.1 {
29 set DB [sqlite3_open test.db]
30 sqlite3_close_v2 $DB
31 } {SQLITE_OK}
32
33 do_test 1.2.1 {
34 set DB [sqlite3_open test.db]
35 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
36 sqlite3_close_v2 $DB
37 } {SQLITE_OK}
38 do_test 1.2.2 {
39 sqlite3_finalize $STMT
40 } {SQLITE_OK}
41
42 do_test 1.3.1 {
43 set DB [sqlite3_open test.db]
44 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
45 sqlite3_step $STMT
46 sqlite3_close_v2 $DB
47 } {SQLITE_OK}
48
49 do_test 1.3.2 {
50 sqlite3_column_text $STMT 0
51 } {one}
52
53 do_test 1.3.3 {
54 sqlite3_finalize $STMT
55 } {SQLITE_OK}
56
57 do_test 1.4.1 {
58 set DB [sqlite3_open test.db]
59 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
60 sqlite3_step $STMT
61 sqlite3_close_v2 $DB
62 } {SQLITE_OK}
63
64 do_test 1.4.2 {
65 list [sqlite3_step $STMT] [sqlite3_column_text $STMT 0]
66 } {SQLITE_ROW two}
67
68 do_test 1.4.3 {
69 list [catch {
70 sqlite3_prepare $DB "SELECT * FROM sqlite_master" -1 dummy
71 } msg] $msg
72 } {1 {(21) library routine called out of sequence}}
73
74 do_test 1.4.4 {
75 sqlite3_finalize $STMT
76 } {SQLITE_OK}
77
78 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/check.test ('k') | third_party/sqlite/sqlite-src-3080704/test/closure01.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698