OLD | NEW |
1 # 2011 May 06 | 1 # 2011 May 06 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
11 # | 11 # |
12 | 12 |
13 set testdir [file dirname $argv0] | 13 set testdir [file dirname $argv0] |
14 source $testdir/tester.tcl | 14 source $testdir/tester.tcl |
15 set testprefix e_uri | 15 set testprefix e_uri |
16 | 16 |
17 db close | 17 db close |
18 | 18 |
19 proc parse_uri {uri} { | 19 proc parse_uri {uri} { |
20 testvfs tvfs2 | 20 testvfs tvfs2 |
21 testvfs tvfs | 21 testvfs tvfs |
22 tvfs filter xOpen | 22 tvfs filter xOpen |
23 tvfs script parse_uri_open_cb | 23 tvfs script parse_uri_open_cb |
24 | 24 |
25 set ::uri_open [list] | 25 set ::uri_open [list] |
26 set DB [sqlite3_open_v2 $uri { | 26 set DB [sqlite3_open_v2 $uri { |
27 SQLITE_OPEN_READWRITE SQLITE_OPEN_CREATE SQLITE_OPEN_WAL | 27 SQLITE_OPEN_READWRITE SQLITE_OPEN_CREATE SQLITE_OPEN_WAL |
28 } tvfs] | 28 } tvfs] |
| 29 set fileName [sqlite3_db_filename $DB main] |
29 sqlite3_close $DB | 30 sqlite3_close $DB |
| 31 forcedelete $fileName |
30 tvfs delete | 32 tvfs delete |
31 tvfs2 delete | 33 tvfs2 delete |
32 | 34 |
33 set ::uri_open | 35 set ::uri_open |
34 } | 36 } |
35 proc parse_uri_open_cb {method file arglist} { | 37 proc parse_uri_open_cb {method file arglist} { |
36 set ::uri_open [list $file $arglist] | 38 set ::uri_open [list $file $arglist] |
37 } | 39 } |
38 | 40 |
39 proc open_uri_error {uri} { | 41 proc open_uri_error {uri} { |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 # | 453 # |
452 foreach {tn uri parse} " | 454 foreach {tn uri parse} " |
453 1 {file:/test.%64%62} {/test.db {}} | 455 1 {file:/test.%64%62} {/test.db {}} |
454 2 {file:/test.db?%68%65%6c%6c%6f=%77%6f%72%6c%64} {/test.db {hello world}} | 456 2 {file:/test.db?%68%65%6c%6c%6f=%77%6f%72%6c%64} {/test.db {hello world}} |
455 3 {file:/%C3%BF.db} {/\xFF.db {}} | 457 3 {file:/%C3%BF.db} {/\xFF.db {}} |
456 " { | 458 " { |
457 do_filepath_test 13.$tn { parse_uri $uri } $parse | 459 do_filepath_test 13.$tn { parse_uri $uri } $parse |
458 } | 460 } |
459 | 461 |
460 finish_test | 462 finish_test |
OLD | NEW |