summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-03-30 15:35:45 (GMT)
committervincentdarley <vincentdarley>2004-03-30 15:35:45 (GMT)
commit5b3cf09d56c6bccfa2d2d4ffcedab7afa9738188 (patch)
treee1181b1465473c4ac32033533ed4cf3cfec67c39 /tests
parente7a7c5a2234e5cee662915660923c347b6a5d07d (diff)
downloadtcl-5b3cf09d56c6bccfa2d2d4ffcedab7afa9738188.zip
tcl-5b3cf09d56c6bccfa2d2d4ffcedab7afa9738188.tar.gz
tcl-5b3cf09d56c6bccfa2d2d4ffcedab7afa9738188.tar.bz2
fix to glob with volume relative paths, bug 898238
Diffstat (limited to 'tests')
-rw-r--r--tests/fileName.test9
-rw-r--r--tests/fileSystem.test22
2 files changed, 28 insertions, 3 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 6168f6f..791b69d 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.39 2004/03/30 09:56:33 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.40 2004/03/30 15:35:47 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1312,12 +1312,15 @@ test filename-14.21 {asterisks, question marks, and brackets} {
test filename-14.22 {asterisks, question marks, and brackets} {
list [catch {glob goo/* x*z foo?q} msg] $msg
} {1 {no files matched glob patterns "goo/* x*z foo?q"}}
-test filename-14.23 {slash globbing} {unixOrPc} {
+test filename-14.23 {slash globbing} {unixOnly} {
glob /
} /
+test filename-14.23.2 {slash globbing} {pcOnly} {
+ glob /
+} [file norm /]
test filename-14.24 {slash globbing} {pcOnly} {
glob {\\}
-} /
+} [file norm /]
test filename-14.25 {type specific globbing} {unixOnly} {
list [catch {lsort [glob -dir globTest -types f *]} msg] $msg
} [list 0 [lsort [list \
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 5f8105d..a619929 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -400,6 +400,28 @@ test filesystem-1.39 {file normalisation with volume relative} {winOnly} {
}
} {ok}
+test filesystem-1.40 {file normalisation with repeated separators} {
+ set a [file norm foo////bar]
+ set b [file norm foo/bar]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
+
+test filesystem-1.41 {file normalisation with repeated separators} {winOnly} {
+ set a [file norm foo\\\\\\bar]
+ set b [file norm foo/bar]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
+
test filesystem-2.0 {new native path} {unixOnly} {
foreach f [lsort [glob -nocomplain /usr/bin/c*]] {
catch {file readlink $f}