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

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

Issue 2747283002: [sql] Import reference version of SQLite 3.17.. (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
(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 # This module bypasses the "-key" logic in tester.tcl, so it cannot run
21 # with the codec enabled.
22 do_not_use_codec
23
24 do_execsql_test 1.0 {
25 CREATE TABLE t1(x);
26 INSERT INTO t1 VALUES('one');
27 INSERT INTO t1 VALUES('two');
28 INSERT INTO t1 VALUES('three');
29 }
30 db close
31
32 do_test 1.1 {
33 set DB [sqlite3_open test.db]
34 sqlite3_close_v2 $DB
35 } {SQLITE_OK}
36
37 do_test 1.2.1 {
38 set DB [sqlite3_open test.db]
39 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
40 sqlite3_close_v2 $DB
41 } {SQLITE_OK}
42 do_test 1.2.2 {
43 sqlite3_finalize $STMT
44 } {SQLITE_OK}
45
46 do_test 1.3.1 {
47 set DB [sqlite3_open test.db]
48 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
49 sqlite3_step $STMT
50 sqlite3_close_v2 $DB
51 } {SQLITE_OK}
52
53 do_test 1.3.2 {
54 sqlite3_column_text $STMT 0
55 } {one}
56
57 do_test 1.3.3 {
58 sqlite3_finalize $STMT
59 } {SQLITE_OK}
60
61 do_test 1.4.1 {
62 set DB [sqlite3_open test.db]
63 set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy]
64 sqlite3_step $STMT
65 sqlite3_close_v2 $DB
66 } {SQLITE_OK}
67
68 do_test 1.4.2 {
69 list [sqlite3_step $STMT] [sqlite3_column_text $STMT 0]
70 } {SQLITE_ROW two}
71
72 do_test 1.4.3 {
73 list [catch {
74 sqlite3_prepare $DB "SELECT * FROM sqlite_master" -1 dummy
75 } msg] $msg
76 } {1 {(21) library routine called out of sequence}}
77
78 do_test 1.4.4 {
79 sqlite3_finalize $STMT
80 } {SQLITE_OK}
81
82 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3170000/test/check.test ('k') | third_party/sqlite/sqlite-src-3170000/test/closure01.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698