summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 2ecb291..a448874 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.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: cmdAH.test,v 1.44 2004/09/27 15:00:40 vincentdarley Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.45 2004/10/25 21:52:42 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -361,16 +361,18 @@ test cmdAH-8.44 {Tcl_FileObjCmd: dirname} testsetplatform {
test cmdAH-8.45 {Tcl_FileObjCmd: dirname} {
-constraints {Tcltest testsetplatform}
-match regexp
+ -setup {
+ set temp $::env(HOME)
+ }
-body {
- global env
- set temp $env(HOME)
- set env(HOME) "/homewontexist/test"
+ set ::env(HOME) "/homewontexist/test"
testsetplatform windows
- set result [list [catch {file dirname ~} msg] $msg]
- set env(HOME) $temp
- set result
+ file dirname ~
}
- -result {{0 ([a-zA-Z]:?)/homewontexist}}
+ -cleanup {
+ set ::env(HOME) $temp
+ }
+ -result {([a-zA-Z]:?)/homewontexist}
}
test cmdAH-8.46 {Tcl_FileObjCmd: dirname} {