/ Check-in [328f79bb]
Login

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

Overview
Comment:Make the test 'vtabH-3.1' work when there are less than 5 top-level items.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 328f79bb5713abbecaeb0ef3fb37f56a0946b915
User & Date: mistachkin 2016-08-26 01:47:22
Context
2016-09-07
19:31
Merge selected test fixes from trunk. check-in: 71866b36 user: mistachkin tags: branch-3.14
2016-08-26
02:10
Adapt the special case of '$' in item names for test 'vtabH-3.1' as well. check-in: e4aeaa2b user: mistachkin tags: trunk
01:47
Make the test 'vtabH-3.1' work when there are less than 5 top-level items. check-in: 328f79bb user: mistachkin tags: trunk
01:17
Support running the fstree tests in 'vtabH.test' on Windows when not using the system drive. check-in: 3680f95f user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to test/vtabH.test.

   148    148     }
   149    149   
   150    150     # Read the first 5 entries from the root directory.  Except, ignore
   151    151     # files that contain the "$" character in their names as these are
   152    152     # special files on some Windows platforms.
   153    153     #
   154    154     set res [list]
   155         -  foreach p [lrange [list_root_files] 0 4] {
          155  +  set root_files [list_root_files]
          156  +  set num_root_files [llength $root_files]
          157  +  set lim_root_files [expr {$num_root_files > 5 ? 5 : $num_root_files}]
          158  +  foreach p [lrange $root_files 0 [expr {$lim_root_files - 1}]] {
   156    159       if {$::tcl_platform(platform) eq "windows"} {
   157    160         if {![regexp {\$} $p]} {lappend res $p}
   158    161       } else {
   159    162         lappend res "/$p"
   160    163       }
   161    164     }
   162         -  do_execsql_test 3.1 {
   163         -    SELECT path FROM fstree WHERE path NOT GLOB '*$*' LIMIT 5;
   164         -  } $res
          165  +  do_execsql_test 3.1 [subst {
          166  +    SELECT path FROM fstree WHERE path NOT GLOB '*\$*' LIMIT $lim_root_files;
          167  +  }] $res
   165    168   
   166    169     # Read all entries in the current directory.
   167    170     #
   168    171     proc contents {pattern} {
   169    172       set res [list]
   170    173       foreach f [list_files $pattern] {
   171    174         lappend res $f