summaryrefslogtreecommitdiffstats
path: root/tests/defs.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-06-13 15:31:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-06-13 15:31:38 (GMT)
commit71ca9685bbb22a1987831ff214a05b647cbb4426 (patch)
tree684f81d68c518ddcb7051828b05c86b22f8591ea /tests/defs.tcl
parent7acca7516ab66ecbea898bbe3ab63c7f3ec7a030 (diff)
downloadtk-71ca9685bbb22a1987831ff214a05b647cbb4426.zip
tk-71ca9685bbb22a1987831ff214a05b647cbb4426.tar.gz
tk-71ca9685bbb22a1987831ff214a05b647cbb4426.tar.bz2
* tests/cursor.test: corrected error after cursor-2.2.
* tests/defs.tcl: Added enhancements to Tk's fake version of tcltest required by recent cursor.test changes.
Diffstat (limited to 'tests/defs.tcl')
-rw-r--r--tests/defs.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/defs.tcl b/tests/defs.tcl
index 3c79557..e16a136 100644
--- a/tests/defs.tcl
+++ b/tests/defs.tcl
@@ -11,7 +11,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: defs.tcl,v 1.8 2001/10/19 17:43:35 hobbs Exp $
+# RCS: @(#) $Id: defs.tcl,v 1.9 2002/06/13 15:31:39 dgp Exp $
# Initialize wish shell
@@ -784,7 +784,10 @@ proc ::tcltest::normalizeMsg {msg} {
# cleanupTests was called, add it to the $filesMade list, so it will
# be removed by the next call to cleanupTests.
#
-proc ::tcltest::makeFile {contents name} {
+proc ::tcltest::makeFile {contents name {directory {}}} {
+ if {[string length $directory]} {
+ set name [file join $directory $name]
+ }
set fd [open $name w]
fconfigure $fd -translation lf
if {[string index $contents [expr {[string length $contents] - 1}]] == "\n"} {
@@ -819,6 +822,7 @@ proc ::tcltest::makeDirectory {name} {
if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} {
lappend ::tcltest::filesMade $fullName
}
+ return $fullName
}
proc ::tcltest::removeDirectory {name} {