SQLite

Check-in [1bab03c481]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update evidence marks on the URI filename tests to conform to the latest documentation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1bab03c4811b5e5b3d15632bc2a3844891f9fad7
User & Date: drh 2011-05-30 15:06:48.453
Context
2011-05-30
23:42
Minor performance improvements. (check-in: f9950c6af1 user: drh tags: trunk)
15:06
Update evidence marks on the URI filename tests to conform to the latest documentation. (check-in: 1bab03c481 user: drh tags: trunk)
14:35
Make sure the P5 argument to the OP_VUpdate opcode is always set to a valid conflict resolution code. (check-in: e3350dbd9f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/e_uri.test.
44
45
46
47
48
49
50
51
52
53
54

55
56
57
58
59
60
61
  set e
}

# EVIDENCE-OF: R-35840-33204 If URI filename interpretation is enabled,
# and the filename argument begins with "file:", then the filename is
# interpreted as a URI.
#
# EVIDENCE-OF: R-00067-59538 URI filename interpretation is enabled if
# the SQLITE_OPEN_URI flag is is set in the fourth argument to
# sqlite3_open_v2(), or if it has been enabled globally using the
# SQLITE_CONFIG_URI option with the sqlite3_config() method.

#
if {$tcl_platform(platform) == "unix"} {
  set flags [list SQLITE_OPEN_READWRITE SQLITE_OPEN_CREATE]

  # Tests with SQLITE_CONFIG_URI configured to false. URI intepretation is
  # only enabled if the SQLITE_OPEN_URI flag is specified.
  sqlite3_shutdown







|


|
>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  set e
}

# EVIDENCE-OF: R-35840-33204 If URI filename interpretation is enabled,
# and the filename argument begins with "file:", then the filename is
# interpreted as a URI.
#
# EVIDENCE-OF: R-32637-34037 URI filename interpretation is enabled if
# the SQLITE_OPEN_URI flag is is set in the fourth argument to
# sqlite3_open_v2(), or if it has been enabled globally using the
# SQLITE_CONFIG_URI option with the sqlite3_config() method or by the
# SQLITE_USE_URI compile-time option.
#
if {$tcl_platform(platform) == "unix"} {
  set flags [list SQLITE_OPEN_READWRITE SQLITE_OPEN_CREATE]

  # Tests with SQLITE_CONFIG_URI configured to false. URI intepretation is
  # only enabled if the SQLITE_OPEN_URI flag is specified.
  sqlite3_shutdown
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
      set e [sqlite3_errmsg $DB]
      sqlite3_close $DB
      set e
    } $error
  }
}

# EVIDENCE-OF: R-43804-65312 The 'fragment' component of a URI, if
# present, is always ignored.
#
#   It is difficult to test that something is ignore correctly. So these tests
#   just show that adding a fragment does not interfere with the pathname or
#   parameters passed through to the VFS xOpen() methods.
#
if {$tcl_platform(platform) == "unix"} {
  foreach {tn uri parse} "
    1    {file:test.db#abc}     {[pwd]/test.db {}}
    2    {file:test.db?a=b#abc} {[pwd]/test.db {a b}}
    3    {file:test.db?a=b#?c=d} {[pwd]/test.db {a b}}
  " {
    do_test 3.$tn { parse_uri $uri } $parse
  }
}

# EVIDENCE-OF: R-00273-20588 SQLite uses the 'path' component of the URI
# as the path to the database file to open.
#
# EVIDENCE-OF: R-28659-11035 If the path begins with a '/' character,
# then it is interpreted as an absolute path.
#
# EVIDENCE-OF: R-39349-47203 If it does not begin with a '/', it is

# interpreted as a relative path.
#
if {$tcl_platform(platform) == "unix"} {
  foreach {tn uri parse} "
    1    {file:test.db}             {[pwd]/test.db {}}
    2    {file:/test.db}            {/test.db {}}
    3    {file:///test.db}          {/test.db {}}
    4    {file://localhost/test.db} {/test.db {}}







|
|















|
|




|
>
|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
      set e [sqlite3_errmsg $DB]
      sqlite3_close $DB
      set e
    } $error
  }
}

# EVIDENCE-OF: R-45981-25528 The fragment component of a URI, if
# present, is ignored.
#
#   It is difficult to test that something is ignore correctly. So these tests
#   just show that adding a fragment does not interfere with the pathname or
#   parameters passed through to the VFS xOpen() methods.
#
if {$tcl_platform(platform) == "unix"} {
  foreach {tn uri parse} "
    1    {file:test.db#abc}     {[pwd]/test.db {}}
    2    {file:test.db?a=b#abc} {[pwd]/test.db {a b}}
    3    {file:test.db?a=b#?c=d} {[pwd]/test.db {a b}}
  " {
    do_test 3.$tn { parse_uri $uri } $parse
  }
}

# EVIDENCE-OF: R-62557-09390 SQLite uses the path component of the URI
# as the name of the disk file which contains the database.
#
# EVIDENCE-OF: R-28659-11035 If the path begins with a '/' character,
# then it is interpreted as an absolute path.
#
# EVIDENCE-OF: R-46234-61323 If the path does not begin with a '/'
# (meaning that the authority section is omitted from the URI) then the
# path is interpreted as a relative path.
#
if {$tcl_platform(platform) == "unix"} {
  foreach {tn uri parse} "
    1    {file:test.db}             {[pwd]/test.db {}}
    2    {file:/test.db}            {/test.db {}}
    3    {file:///test.db}          {/test.db {}}
    4    {file://localhost/test.db} {/test.db {}}