summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-25 21:52:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-25 21:52:41 (GMT)
commit6855a1fa6afb4654fbdd7614af54edae396a2474 (patch)
tree27bdc1f33a2882d221375cb5fda96a0a67137056 /tests
parent2ddf71d5d424c34dfbcc0b9f55cf9baeabbe9e4b (diff)
downloadtcl-6855a1fa6afb4654fbdd7614af54edae396a2474.zip
tcl-6855a1fa6afb4654fbdd7614af54edae396a2474.tar.gz
tcl-6855a1fa6afb4654fbdd7614af54edae396a2474.tar.bz2
Remove some of the contortions from cmdAH-8.45
Diffstat (limited to 'tests')
-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} {