diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fileName.test | 9 | ||||
-rw-r--r-- | tests/fileSystem.test | 22 |
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} |