/ Check-in [2018d4e1]
Login

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

Overview
Comment:Fix the URI test script so that it works even if there is a subdirectory named "test".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2018d4e108872f2436df046636401b89cfde589d
User & Date: drh 2011-05-20 01:50:01
Context
2011-05-20
13:26
Add a big comment to the top of test_vfstrace.c to explain how to compile and use that module. check-in: a6a0fefb user: drh tags: trunk
01:50
Fix the URI test script so that it works even if there is a subdirectory named "test". check-in: 2018d4e1 user: drh tags: trunk
01:49
Mark an unreachable branch in the recent WAL problem as unreachable. check-in: 3e8a29ff user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/uri.test.

    42     42     7      file:test.db?mork=1#boris            test.db
    43     43     8      file:test.db#boris                   test.db
    44     44     9      test.db#boris                        test.db#boris
    45     45     10     file:test%2Edb                       test.db
    46     46     11     file                                 file
    47     47     12     http:test.db                         http:test.db
    48     48     13     file:test.db%00extra                 test.db
    49         -  14     file:test%00.db%00extra              test
           49  +  14     file:testdb%00.db%00extra            testdb
    50     50   
    51     51     15     test.db?mork=1#boris                 test.db?mork=1#boris
    52     52     16     file://localhostPWD/test.db%3Fhello  test.db?hello
    53     53   } {
    54     54     
    55     55     if {$tcl_platform(platform)=="windows"} {
    56     56       if {$tn>14} break
    57     57       set uri  [string map [list PWD /[pwd]] $uri]
    58     58     } else {
    59     59       set uri  [string map [list PWD [pwd]] $uri]
    60     60     }
    61     61   
           62  +  if {[file isdir $file]} {error "$file is a directory"}
    62     63     forcedelete $file
    63     64     do_test 1.$tn.1 { file exists $file } 0
    64     65     set DB [sqlite3_open $uri]
    65     66     do_test 1.$tn.2 { file exists $file } 1
    66     67     sqlite3_close $DB
    67     68     forcedelete $file
    68     69   
................................................................................
    86     87   }
    87     88   foreach {tn uri kvlist} {
    88     89     1      file:test.db?hello=world                     {hello world}
    89     90     2      file:test.db?hello&world                     {hello {} world {}}
    90     91     3      file:test.db?hello=1&world=2&vfs=tvfs        {hello 1 world 2 vfs tvfs}
    91     92     4      file:test.db?hello=1&world=2&vfs=tvfs2        {}
    92     93     5      file:test.db?%68%65%6C%6C%6F=%77%6F%72%6C%64 {hello world}
    93         -  6      file:test%00.db?hello%00extra=world%00ex     {hello world}
    94         -  7      file:test%00.db?hello%00=world%00            {hello world}
    95         -  8      file:test%00.db?=world&xyz=abc               {xyz abc}
           94  +  6      file:testdb%00.db?hello%00extra=world%00ex   {hello world}
           95  +  7      file:testdb%00.db?hello%00=world%00          {hello world}
           96  +  8      file:testdb%00.db?=world&xyz=abc             {xyz abc}
    96     97     9      file:test.db?%00hello=world&xyz=abc          {xyz abc}
    97     98     10     file:test.db?hello=%00world&xyz=             {hello {} xyz {}}
    98     99     11     file:test.db?=#ravada                        {}
    99    100     12     file:test.db?&&&&&&&&hello=world&&&&&&&      {hello world}
   100    101   
   101    102     13     test.db?&&&&&&&&hello=world&&&&&&&           {}
   102    103     14     http:test.db?hello&world                     {}