summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/tcltest/tcltest.tcl11
-rw-r--r--library/tcltest1.0/tcltest.tcl11
2 files changed, 10 insertions, 12 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 55631aa..3de4a31 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -12,7 +12,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.17 1999/10/21 02:17:43 hobbs Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.18 1999/10/29 03:04:16 hobbs Exp $
package provide tcltest 1.0
@@ -1698,23 +1698,22 @@ proc ::tcltest::makeFile {contents name} {
DebugPuts 3 "::tcltest::makeFile: putting $contents into $name"
- set fd [open [file join $::tcltest::temporaryDirectory $name] w]
+ set fullName [file join $::tcltest::temporaryDirectory $name]
+ set fd [open $fullName w]
fconfigure $fd -translation lf
- if {[string equal \
- [string index $contents [expr {[string length $contents] - 1}]] \
- "\n"]} {
+ if {[string equal [string index $contents end] "\n"]} {
puts -nonewline $fd $contents
} else {
puts $fd $contents
}
close $fd
- set fullName [file join [pwd] $name]
if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} {
lappend ::tcltest::filesMade $fullName
}
+ return $fullName
}
# ::tcltest::removeFile --
diff --git a/library/tcltest1.0/tcltest.tcl b/library/tcltest1.0/tcltest.tcl
index 55631aa..3de4a31 100644
--- a/library/tcltest1.0/tcltest.tcl
+++ b/library/tcltest1.0/tcltest.tcl
@@ -12,7 +12,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.17 1999/10/21 02:17:43 hobbs Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.18 1999/10/29 03:04:16 hobbs Exp $
package provide tcltest 1.0
@@ -1698,23 +1698,22 @@ proc ::tcltest::makeFile {contents name} {
DebugPuts 3 "::tcltest::makeFile: putting $contents into $name"
- set fd [open [file join $::tcltest::temporaryDirectory $name] w]
+ set fullName [file join $::tcltest::temporaryDirectory $name]
+ set fd [open $fullName w]
fconfigure $fd -translation lf
- if {[string equal \
- [string index $contents [expr {[string length $contents] - 1}]] \
- "\n"]} {
+ if {[string equal [string index $contents end] "\n"]} {
puts -nonewline $fd $contents
} else {
puts $fd $contents
}
close $fd
- set fullName [file join [pwd] $name]
if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} {
lappend ::tcltest::filesMade $fullName
}
+ return $fullName
}
# ::tcltest::removeFile --