diff options
author | vincentdarley <vincentdarley> | 2001-08-23 17:37:07 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2001-08-23 17:37:07 (GMT) |
commit | f319c32167c2c52995fe53b438ef4bc34e9a4914 (patch) | |
tree | 6169e1176aad79725e33cee0d99ca91f726feed6 /tests/fileName.test | |
parent | 8d4c60866a8f603ab29fa193c8f4aff83f8beee7 (diff) | |
download | tcl-f319c32167c2c52995fe53b438ef4bc34e9a4914.zip tcl-f319c32167c2c52995fe53b438ef4bc34e9a4914.tar.gz tcl-f319c32167c2c52995fe53b438ef4bc34e9a4914.tar.bz2 |
fs update
Diffstat (limited to 'tests/fileName.test')
-rw-r--r-- | tests/fileName.test | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test index 318b3ab..a1a0011 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.11 2001/07/31 19:12:07 vincentdarley Exp $ +# RCS: @(#) $Id: fileName.test,v 1.12 2001/08/23 17:37:08 vincentdarley Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1143,6 +1143,61 @@ test filename-11.17.1 {Tcl_GlobCmd} {pcOnly macOnly} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.17.2 {Tcl_GlobCmd} {unixOnly notRoot} { + set dir [pwd] + set ret "error in test" + if {[catch { + cd $globname + exec ln -s a1 link + cd $dir + set ret [list [catch { + lsort [glob -directory $globname -join * b1] + } msg] $msg] + }]} { + cd $dir + } + file delete [file join $globname link] + set ret +} [list 0 [lsort [list [file join $globname a1 b1] \ + [file join $globname link b1]]]] +# Simpler version of the above test to illustrate a given bug. +test filename-11.17.3 {Tcl_GlobCmd} {unixOnly notRoot} { + set dir [pwd] + set ret "error in test" + if {[catch { + cd $globname + exec ln -s a1 link + cd $dir + set ret [list [catch { + lsort [glob -directory $globname -type d *] + } msg] $msg] + }]} { + cd $dir + } + file delete [file join $globname link] + set ret +} [list 0 [lsort [list [file join $globname a1] \ + [file join $globname a2] \ + [file join $globname a3] \ + [file join $globname link]]]] +# Make sure the bugfix isn't too simple. We don't want +# to break 'glob -type l'. +test filename-11.17.4 {Tcl_GlobCmd} {unixOnly notRoot} { + set dir [pwd] + set ret "error in test" + if {[catch { + cd $globname + exec ln -s a1 link + cd $dir + set ret [list [catch { + lsort [glob -directory $globname -type l *] + } msg] $msg] + }]} { + cd $dir + } + file delete [file join $globname link] + set ret +} [list 0 [list [file join $globname link]]] test filename-11.18 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -path $globname/ *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ |