summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-02-12 18:57:43 (GMT)
committervincentdarley <vincentdarley>2003-02-12 18:57:43 (GMT)
commita7beeb8e861f0a22b48f42d0725bd6d1c9dc6f73 (patch)
treeb100d4dd9bf3072e691813a756381ae21d9309ae /tests
parentb05122813d01093b2b7448f1554203b7915f0905 (diff)
downloadtcl-a7beeb8e861f0a22b48f42d0725bd6d1c9dc6f73.zip
tcl-a7beeb8e861f0a22b48f42d0725bd6d1c9dc6f73.tar.gz
tcl-a7beeb8e861f0a22b48f42d0725bd6d1c9dc6f73.tar.bz2
glob -l on broken symlink fix
Diffstat (limited to 'tests')
-rw-r--r--tests/fCmd.test12
-rw-r--r--tests/fileName.test43
2 files changed, 48 insertions, 7 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 08ff618..e3bec24 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.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: fCmd.test,v 1.25 2002/10/04 08:25:14 dkf Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.26 2003/02/12 19:18:13 vincentdarley Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -69,11 +69,11 @@ proc openup {path} {
}
proc cleanup {args} {
- if {$::tcl_platform(platform) == "macintosh"} {
- set wd [list :]
- } else {
- set wd [list .]
- }
+ if {$::tcl_platform(platform) == "macintosh"} {
+ set wd [list :]
+ } else {
+ set wd [list .]
+ }
foreach p [concat $wd $args] {
set x ""
catch {
diff --git a/tests/fileName.test b/tests/fileName.test
index 15bef4e..01b67ef 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.29 2003/02/07 15:29:31 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.30 2003/02/12 18:57:51 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1185,6 +1185,11 @@ if {[string equal $tcl_platform(platform) "windows"]} {
} else {
tcltest::testConstraint linkDirectory 1
}
+if {[string equal $tcl_platform(platform) "windows"]} {
+ tcltest::testConstraint symbolicLinkFile 0
+} else {
+ tcltest::testConstraint symbolicLinkFile 1
+}
test filename-11.17.2 {Tcl_GlobCmd} {notRoot linkDirectory} {
set dir [pwd]
set ret "error in test"
@@ -1247,6 +1252,42 @@ test filename-11.17.6 {Tcl_GlobCmd} {
list [catch {lsort [glob -directory $globname -tails *.c *.c]} msg] $msg
} [list 0 [lsort [concat [list "weird name.c" x,z1.c x1.c y1.c z1.c] \
[list "weird name.c" x,z1.c x1.c y1.c z1.c]]]]
+test filename-11.17.7 {Tcl_GlobCmd: broken link and glob -l} {linkDirectory} {
+ set dir [pwd]
+ set ret "error in test"
+ if {[catch {
+ cd $globname
+ file mkdir nonexistent
+ file link -symbolic link nonexistent
+ file delete nonexistent
+ cd $dir
+ set ret [list [catch {
+ lsort [glob -nocomplain -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.17.8 {Tcl_GlobCmd: broken link and glob -l} {symbolicLinkFile} {
+ set dir [pwd]
+ set ret "error in test"
+ if {[catch {
+ cd $globname
+ close [open "nonexistent" w]
+ file link -symbolic link nonexistent
+ file delete nonexistent
+ cd $dir
+ set ret [list [catch {
+ lsort [glob -nocomplain -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]\