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

Side by Side Diff: third_party/sqlite/src/test/uri2.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
« no previous file with comments | « third_party/sqlite/src/test/uri.test ('k') | third_party/sqlite/src/test/vacuum5.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # 2016 October 26
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 for SQLITE_ENABLE_URI_00_ERROR builds.
13
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16
17 ifcapable !uri_00_error {
18 finish_test
19 return
20 }
21
22 set testprefix uri2
23 db close
24 sqlite3_shutdown
25 sqlite3_config_uri 1
26
27 foreach {tn uri} {
28 1 file:test.db%00trailing
29 2 file:test.db?%00trailing=1
30 3 file:test.db?trailing=1%00
31 4 file:test.db?trailing=1&abc%00def
32 5 file:test.db?trailing=1&abc%00def
33 } {
34 do_test 1.$tn.1 {
35 set rc [catch { sqlite3 db $uri } msg]
36 list $rc $msg
37 } {1 {unexpected %00 in uri}}
38
39 do_test 1.$tn.2 {
40 set DB2 [sqlite3_open $uri]
41 sqlite3_errcode $DB2
42 } {SQLITE_ERROR}
43
44 catch { sqlite3_close $DB2 }
45
46 do_test 1.$tn.2 {
47 sqlite3 db ""
48 catchsql { ATTACH $uri AS aux }
49 } {1 {unexpected %00 in uri}}
50
51 do_test 1.$tn.3 {
52 sqlite3_errcode db
53 } {SQLITE_ERROR}
54
55 catch { db close }
56 }
57
58 reset_db
59 do_test 2.0 {
60 expr {[lsearch [execsql {PRAGMA compile_options}] ENABLE_URI_00_ERROR] >= 0}
61 } 1
62
63 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/uri.test ('k') | third_party/sqlite/src/test/vacuum5.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698