Fossil SCM
Sort the dictionary made from a directory file listing, because "glob" lists files in different orders depending on OS and filesystem. Found by testing on a FreeBSD UFS directory; may fix Windows as well.
Commit
1a4971545c40bc8e03f070524444525c4c42a01433ef4648b5817d707875a083
Parent
225b4de847d3cc1…
1 file changed
+1
-1
+1
-1
| --- test/roundtrip.test | ||
| +++ test/roundtrip.test | ||
| @@ -132,11 +132,11 @@ | ||
| 132 | 132 | # Returns a dictionary from the name of each file in the current |
| 133 | 133 | # directory and below, except those in SKIP, to its content. |
| 134 | 134 | # |
| 135 | 135 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 136 | 136 | set files [dict create] |
| 137 | - foreach f [glob -nocomplain -directory $dir -tails *] { | |
| 137 | + foreach f [lsort [glob -nocomplain -directory $dir -tails *]] { | |
| 138 | 138 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 139 | 139 | if {$p in $skip} continue |
| 140 | 140 | if {[file isdirectory $p]} { |
| 141 | 141 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 142 | 142 | } else { |
| 143 | 143 |
| --- test/roundtrip.test | |
| +++ test/roundtrip.test | |
| @@ -132,11 +132,11 @@ | |
| 132 | # Returns a dictionary from the name of each file in the current |
| 133 | # directory and below, except those in SKIP, to its content. |
| 134 | # |
| 135 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 136 | set files [dict create] |
| 137 | foreach f [glob -nocomplain -directory $dir -tails *] { |
| 138 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 139 | if {$p in $skip} continue |
| 140 | if {[file isdirectory $p]} { |
| 141 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 142 | } else { |
| 143 |
| --- test/roundtrip.test | |
| +++ test/roundtrip.test | |
| @@ -132,11 +132,11 @@ | |
| 132 | # Returns a dictionary from the name of each file in the current |
| 133 | # directory and below, except those in SKIP, to its content. |
| 134 | # |
| 135 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 136 | set files [dict create] |
| 137 | foreach f [lsort [glob -nocomplain -directory $dir -tails *]] { |
| 138 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 139 | if {$p in $skip} continue |
| 140 | if {[file isdirectory $p]} { |
| 141 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 142 | } else { |
| 143 |