diff options
author | vincentdarley <vincentdarley> | 2004-03-09 12:56:58 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2004-03-09 12:56:58 (GMT) |
commit | 074f543ea2e37afc36c7f281e75575d211bde796 (patch) | |
tree | 25c90b5ff17b1204c2f0cf40451ab799d7fd034a /tests/fileName.test | |
parent | e1afee6bb276d510ee7b22252af4662652500d75 (diff) | |
download | tcl-074f543ea2e37afc36c7f281e75575d211bde796.zip tcl-074f543ea2e37afc36c7f281e75575d211bde796.tar.gz tcl-074f543ea2e37afc36c7f281e75575d211bde796.tar.bz2 |
glob -path fix for near filesystem root
Diffstat (limited to 'tests/fileName.test')
-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 830618b..db431fc 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.30.2.3 2003/10/06 09:49:20 vincentdarley Exp $ +# RCS: @(#) $Id: fileName.test,v 1.30.2.4 2004/03/09 12:56:59 vincentdarley Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1648,6 +1648,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 |