diff options
author | dgp <dgp@users.sourceforge.net> | 2002-07-02 19:10:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-07-02 19:10:56 (GMT) |
commit | 770750a2fc0896392316d3e90e4e5d8e3f6af927 (patch) | |
tree | 488847ff551ccfeb85c461ca2f158781e0d6d020 /library | |
parent | fb0a8df3a872475d55afadea90cfa60033f81266 (diff) | |
download | tcl-770750a2fc0896392316d3e90e4e5d8e3f6af927.zip tcl-770750a2fc0896392316d3e90e4e5d8e3f6af927.tar.gz tcl-770750a2fc0896392316d3e90e4e5d8e3f6af927.tar.bz2 |
* doc/tcltest.n: Reverted [makeFile] and [viewFile] to
* library/tcltest/tcltest.tcl: their former behavior, and documented
* tests/cmdAH.test: it. Corrected misspelling of hook
* tests/event.test: procedure. Restored tests.
* tests/http.test:
* tests/io.test:
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 |