diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fileName.test | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test index fbe016c..181be16 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.36 2004/02/28 15:46:29 vincentdarley Exp $ +# RCS: @(#) $Id: fileName.test,v 1.37 2004/03/09 12:54:02 vincentdarley Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1668,6 +1668,37 @@ test filename-12.5 {simple globbing} { test filename-12.6 {simple globbing} { list [catch {glob globTest\\/\\x1.c} msg] $msg } "0 $globPreResult$x1" +test filename-12.7 {globbing at filesystem root} {unixOnly} { + set res1 [glob -nocomplain /*] + set res2 [glob -path / *] + set equal [string equal $res1 $res2] + if {!$equal} { + lappend equal "not equal" $res1 $res2 + } + set equal +} {1} +test filename-12.8 {globbing at filesystem root} {unixOnly} { + set dir [lindex [glob -type d /*] 0] + set first [string range $dir 0 1] + set res1 [glob -nocomplain ${first}*] + set res2 [glob -path $first *] + set equal [string equal $res1 $res2] + if {!$equal} { + lappend equal "not equal" $res1 $res2 + } + set equal +} {1} +test filename-12.9 {globbing at filesystem root} {winOnly} { + set dir [lindex [glob -type d [lindex [file volumes] 0]*] 0] + set first [string range $dir 0 3] + set res1 [glob -nocomplain ${first}*] + set res2 [glob -path $first *] + set equal [string equal $res1 $res2] + if {!$equal} { + lappend equal "not equal" $res1 $res2 + } + set equal +} {1} test filename-13.1 {globbing with brace substitution} { list [catch {glob globTest/\{\}} msg] $msg |