summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--tests/winFCmd.test39
2 files changed, 35 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index a0268a9..feebc45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-18 Kevin B. Kenny <kennykb@acm.org>
+
+ * tests/winFCmd.test (winFCmd-16.12): Changed test to
+ compute the target directory, so as not to fail if the
+ user's HOME isn't the root.
+
2004-06-19 Daniel Steffen <das@users.sourceforge.net>
* unix/tcl.m4: autoconf 2.5 fixes in Darwin section.
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 2ff1fee..b141c01 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.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: winFCmd.test,v 1.29 2004/05/25 18:46:53 kennykb Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.30 2004/06/18 15:59:18 kennykb Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -1022,15 +1022,30 @@ test winFCmd-16.11 {Windows file normalization} {pcOnly cdrom} {
# Must not crash
set result "no crash"
} {no crash}
-test winFCmd-16.12 {Windows file normalization} {pcOnly} {
- set oldhome ""
- catch {set oldhome $::env(HOME)}
- set ::env(HOME) ${d}:
- cd
- set result [pwd]; # <- Must not crash
- set ::env(HOME) $oldhome
- set result
-} ${d}:/
+
+test winFCmd-16.12 {Windows file normalization} \
+ -constraints pconly \
+ -setup {
+ set oldwd [pwd]
+ set oldhome ""
+ catch {set oldhome $::env(HOME)}
+ } \
+ -body {
+ set expectedResult [file normalize ${d}:]
+ set ::env(HOME) ${d}:
+ cd
+ set result [pwd]; # <- Must not crash
+ if { [string equal $result $expectedResult] } {
+ concat ok
+ } else {
+ list $result != $expectedResult
+ }
+ } \
+ -cleanup {
+ set ::env(HOME) $oldhome
+ cd $oldwd
+ } \
+ -result ok
cd $pwd
unset d dd pwd
@@ -1066,3 +1081,7 @@ unset d dd pwd
cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: