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

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

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 # 2007 Sep 3
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 # Tests on the sqlite3_open_v2() interface.
13 #
14 # $Id: openv2.test,v 1.2 2009/06/11 17:32:45 drh Exp $
15
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18
19 db close
20 forcedelete test.db test.db-journal
21 do_test openv2-1.1 {
22 set rc [catch {sqlite3 db test.db -create 0} msg]
23 lappend rc $msg
24 } {1 {unable to open database file}}
25 do_test openv2-1.2 {
26 info commands db
27 } {}
28 do_test openv2-1.3 {
29 sqlite3 db test.db
30 db eval {CREATE TABLE t1(x)}
31 db close
32 sqlite3 db test.db -readonly 1
33 db eval {SELECT name FROM sqlite_master}
34 } {t1}
35 do_test openv2-1.4 {
36 catchsql {
37 INSERT INTO t1 VALUES(123)
38 }
39 } {1 {attempt to write a readonly database}}
40
41 # Ticket #3908
42 # Honor SQLITE_OPEN_READONLY even on an in-memory database, even though
43 # this is pointless.
44 #
45 do_test openv2-2.1 {
46 db close
47 sqlite3 db :memory: -readonly 1
48 db eval {SELECT * FROM sqlite_master}
49 } {}
50 do_test openv2-2.2 {
51 catchsql {CREATE TABLE t1(x)}
52 } {1 {attempt to write a readonly database}}
53
54
55 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/numcast.test ('k') | third_party/sqlite/sqlite-src-3080704/test/orderby1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698