diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/tcltest/tcltest.tcl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 2794a6e..6871ab9 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.65 2002/07/02 13:28:51 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.66 2002/07/02 19:10:57 dgp Exp $ package require Tcl 8.3 ;# uses [glob -directory] namespace eval tcltest { @@ -1342,7 +1342,7 @@ proc tcltest::ProcessFlags {flagArray} { # Check whether the problem is "unknown option" if {[regexp {^unknown option (\S+):} $msg -> option]} { # Could be this is an option the Hook knows about - set moreOptions [processCmdLineArgsAddFlagHook] + set moreOptions [processCmdLineArgsAddFlagsHook] if {[lsearch -exact $moreOptions $option] == -1} { # Nope. Report the error, including additional options, # but keep going @@ -2897,7 +2897,11 @@ proc tcltest::makeFile {contents name {directory ""}} { set fd [open $fullName w] fconfigure $fd -translation lf - puts -nonewline $fd $contents + if {[string equal [string index $contents end] \n]} { + puts -nonewline $fd $contents + } else { + puts $fd $contents + } close $fd if {[lsearch -exact $filesMade $fullName] == -1} { @@ -3037,7 +3041,7 @@ proc tcltest::viewFile {name {directory ""}} { set fullName [file join $directory $name] set f [open $fullName] fconfigure $f -translation binary - set data [read $f] + set data [read -nonewline $f] close $f return $data } @@ -3284,7 +3288,7 @@ namespace eval tcltest { set required true } foreach hook { PrintUsageInfoHook processCmdLineArgsHook - processCmdLineArgsAddFlagHook } { + processCmdLineArgsAddFlagsHook } { if {[string equal [namespace current] [namespace qualifiers \ [namespace which $hook]]]} { set required true |