summaryrefslogtreecommitdiffstats
path: root/tests/fileName.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2009-10-28 16:46:33 (GMT)
committerKevin B Kenny <kennykb@acm.org>2009-10-28 16:46:33 (GMT)
commit1968b054ce6cb77985b7fabcad41ec530209fad5 (patch)
tree9bf9c7dd1c1bcae0b7d5ed78222e7c8d69f31f96 /tests/fileName.test
parent667646d2977ff01762169575231252c9e9988ee8 (diff)
downloadtcl-1968b054ce6cb77985b7fabcad41ec530209fad5.zip
tcl-1968b054ce6cb77985b7fabcad41ec530209fad5.tar.gz
tcl-1968b054ce6cb77985b7fabcad41ec530209fad5.tar.bz2
* tests/fileName.test (fileName-20.[78]): Corrected poor test
hygiene (failure to save and restore the working directory) that caused these two tests to fail on Windows (and [Bug 2806250] to be reopened).
Diffstat (limited to 'tests/fileName.test')
-rw-r--r--tests/fileName.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index a35cf86..c02cea3 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.64 2009/08/21 18:32:08 dgp Exp $
+# RCS: @(#) $Id: fileName.test,v 1.65 2009/10/28 16:46:33 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -1436,6 +1436,11 @@ test filename-16.17 {windows specific globbing} -constraints {win} -body {
[glob -nocomplain -tails -dir C: *]
} -match compareWords -result equal
+# Put the working directory back now that we're done with globbing in C:/
+if {[testConstraint win]} {
+ cd $oldDir
+}
+
test filename-17.1 {windows specific special files} {testsetplatform} {
testsetplatform win
list [file pathtype com1] [file pathtype con] [file pathtype lpt3] \
@@ -1543,6 +1548,8 @@ test fileName-20.6 {Bug 2837800} -setup {
} -result {}
test fileName-20.7 {Bug 2806250} -setup {
+ set savewd [pwd]
+ cd [temporaryDirectory]
set d [makeDirectory isolate]
makeFile {} ./~test $d
} -body {
@@ -1550,9 +1557,12 @@ test fileName-20.7 {Bug 2806250} -setup {
} -cleanup {
removeFile ./~test $d
removeDirectory isolate
+ cd $savewd
} -result 1
test fileName-20.8 {Bug 2806250} -setup {
+ set savewd [pwd]
+ cd [temporaryDirectory]
set d [makeDirectory isolate]
makeFile {} ./~test $d
} -body {
@@ -1560,6 +1570,7 @@ test fileName-20.8 {Bug 2806250} -setup {
} -cleanup {
removeFile ./~test $d
removeDirectory isolate
+ cd $savewd
} -result ./~test
test fileName-20.9 {} -setup {