Tcl Source Code

Artifact [0a37fd24b7]
Login

Artifact 0a37fd24b7bf476cd6eb9475cd571a9a71390edc:

Attachment "947440.patch" to ticket [947440ffff] added by dgp 2004-05-04 23:22:24.
Index: tests/tcltest.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/tcltest.test,v
retrieving revision 1.40
diff -u -r1.40 tcltest.test
--- tests/tcltest.test	2 Apr 2004 17:39:24 -0000	1.40
+++ tests/tcltest.test	4 May 2004 16:21:40 -0000
@@ -525,9 +525,7 @@
 set tdiaf [makeFile {} thisdirectoryisafile]
 
 set normaldirectory [makeDirectory normaldirectory]
-if {$::tcl_platform(platform) == "macintosh"} {
-set normaldirectory [file normalize $normaldirectory]
-}
+normalizePath normaldirectory
 
 # -tmpdir, [temporaryDirectory]
 test tcltest-8.1 {tcltest a.tcl -tmpdir a} {unixOrPc} {
@@ -701,15 +699,26 @@
 removeDirectory normaldirectory
 
 # -file, -notfile, [matchFiles], [skipFiles]
-test tcltest-9.1 {-file a*.tcl} {unixOrPc} {
+test tcltest-9.1 {-file a*.tcl} -constraints {unixOrPc} -setup {
+    set old [testsDirectory]
+    testsDirectory [file dirname [info script]]
+} -body {
     slave msg [file join [testsDirectory] all.tcl] -file a*.test
-    list [regexp assocd\.test $msg]
-} {1}
-test tcltest-9.2 {-file a*.tcl} {unixOrPc} {
+    set msg
+} -cleanup {
+    testsDirectory $old
+} -match regexp -result {assocd\.test}
+
+test tcltest-9.2 {-file a*.tcl} -constraints {unixOrPc} -setup {
+    set old [testsDirectory]
+    testsDirectory [file dirname [info script]]
+} -body {
     slave msg [file join [testsDirectory] all.tcl] \
 	    -file a*.test -notfile assocd*
-    list [regexp assocd\.test $msg]
-} {0}
+    regexp {assocd\.test} $msg
+} -cleanup {
+    testsDirectory $old
+} -result 0
 
 test tcltest-9.3 {matchFiles}  {
     -body {