3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
12 # Tests for SQLITE_ENABLE_URI_00_ERROR builds.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
17 ifcapable !uri_00_error {
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
35 set rc [catch { sqlite3 db $uri } msg]
37 } {1 {unexpected %00 in uri}}
40 set DB2 [sqlite3_open $uri]
44 catch { sqlite3_close $DB2 }
48 catchsql { ATTACH $uri AS aux }
49 } {1 {unexpected %00 in uri}}
60 expr {[lsearch [execsql {PRAGMA compile_options}] ENABLE_URI_00_ERROR] >= 0}