From 9f072ac4043a1c048fb8ccb62c214508080ad25e Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 4 May 2004 19:50:05 +0000 Subject: * tests/tcltest.test: Test corrections for Mac OSX. Thanks to Steven Abner (tauvan). [Bug 947440] --- ChangeLog | 5 +++++ tests/tcltest.test | 29 +++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60f8284..46d14f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Don Porter + + * tests/tcltest.test: Test corrections for Mac OSX. Thanks + to Steven Abner (tauvan). [Bug 947440] + 2004-05-04 Donal K. Fellows * generic/tclEvent.c (TclSetLibraryPath): Suppress a warning. diff --git a/tests/tcltest.test b/tests/tcltest.test index 9d0a03c..3ffbfd7 100755 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -6,7 +6,7 @@ # Copyright (c) 2000 by Ajuba Solutions # All rights reserved. # -# RCS: @(#) $Id: tcltest.test,v 1.40 2004/04/02 17:39:24 dgp Exp $ +# RCS: @(#) $Id: tcltest.test,v 1.41 2004/05/04 19:50:06 dgp Exp $ # Note that there are several places where the value of # tcltest::currentFailure is stored/reset in the -setup/-cleanup @@ -525,9 +525,7 @@ set a [makeFile { 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 @@ removeFile thisdirectoryisafile 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 { -- cgit v0.12