summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-07-18 21:01:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-07-18 21:01:32 (GMT)
commitb25c5f06f00da440388032287bc5c7149f8f7f81 (patch)
treecc557671019e89fedd2d6c3cd71ed72587fd3a22 /doc
parent347b02938c7c7c395f06b1d0772ca323c80cd12d (diff)
downloadtcl-b25c5f06f00da440388032287bc5c7149f8f7f81.zip
tcl-b25c5f06f00da440388032287bc5c7149f8f7f81.tar.gz
tcl-b25c5f06f00da440388032287bc5c7149f8f7f81.tar.bz2
* doc/tcltest.n: Restored the [Eval] proc to replace
* library/tcltest/tcltest.tcl: the [::puts] command when either the -output or -error option for [test] is in use, in order to capture data written to the output or error channels for comparison against what is expected. This is easier to document and agrees better with most user expectations than the previous attempt to replace [puts] only in the caller's namespace. Documentation made more precise on the subject. [Bug 706359]
Diffstat (limited to 'doc')
-rw-r--r--doc/tcltest.n14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/tcltest.n b/doc/tcltest.n
index 86af612..f6067ee 100644
--- a/doc/tcltest.n
+++ b/doc/tcltest.n
@@ -8,7 +8,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: tcltest.n,v 1.38.2.2 2003/03/26 23:51:25 dgp Exp $
+'\" RCS: @(#) $Id: tcltest.n,v 1.38.2.3 2003/07/18 21:01:32 dgp Exp $
'\"
.so man.macros
.TH "tcltest" n 2.2 tcltest "Tcl Bundled Packages"
@@ -476,7 +476,7 @@ an empty string.
The \fB-output\fR attribute supplies the \fIexpectedValue\fR against which
any output sent to \fBstdout\fR or [\fBoutputChannel\fR] during evaluation
of the script(s) will be compared. Note that only output printed using
-[\fBputs\fR] is used for comparison. If \fB-output\fR is not specified,
+[\fB::puts\fR] is used for comparison. If \fB-output\fR is not specified,
output sent to \fBstdout\fR and [\fBoutputChannel\fR] is not processed for
comparison.
.TP
@@ -484,7 +484,7 @@ comparison.
The \fB-errorOutput\fR attribute supplies the \fIexpectedValue\fR against
which any output sent to \fBstderr\fR or [\fBerrorChannel\fR] during
evaluation of the script(s) will be compared. Note that only output
-printed using [\fBputs\fR] is used for comparison. If \fB-errorOutput\fR
+printed using [\fB::puts\fR] is used for comparison. If \fB-errorOutput\fR
is not specified, output sent to \fBstderr\fR and [\fBerrorChannel\fR] is
not processed for comparison.
.TP
@@ -512,7 +512,7 @@ In default operation, a successful test produces no output. The output
messages produced by [\fBtest\fR] are controlled by the
[\fBconfigure -verbose\fR] option as described in \fBCONFIGURABLE OPTIONS\fR
below. Any output produced by the test scripts themselves should be
-produced using [\fBputs\fR] to [\fBoutputChannel\fR] or
+produced using [\fB::puts\fR] to [\fBoutputChannel\fR] or
[\fBerrorChannel\fR], so that users of the test suite may
easily capture output with the [\fBconfigure -outfile\fR] and
[\fBconfigure -errfile\fR] options, and so that the \fB-output\fR
@@ -1050,13 +1050,13 @@ where 'm', 'n', 'o', and 'p' refer to tests that were run at the
same test level as test level-1.1.
.PP
Implementation of output and error comparison in the test command
-depends on usage of puts in your application code. Output is
-intercepted by redefining the puts command while the defined test
+depends on usage of ::puts in your application code. Output is
+intercepted by redefining the ::puts command while the defined test
script is being run. Errors thrown by C procedures or printed
directly from C applications will not be caught by the test command.
Therefore, usage of the \fB-output\fR and \fB-errorOuput\fR
options to [\fBtest\fR] is useful only for pure Tcl applications
-that use [\fBputs\fR] to produce output.
+that use [\fB::puts\fR] to produce output.
.SH KEYWORDS
test, test harness, test suite