From 72fa46ad9e761e0b716595388c110e5ae009ee3f Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 27 Jun 2002 22:29:08 +0000 Subject: * Work in progress updating the documentation of the packages that come bundled with the Tcl source distribution, notably tcltest. --- ChangeLog | 6 +++ doc/dde.n | 4 +- doc/http.n | 6 +-- doc/msgcat.n | 2 +- doc/registry.n | 4 +- doc/tcltest.n | 167 ++++++++++++++++++++++++++------------------------------- 6 files changed, 90 insertions(+), 99 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63238e4..4521eca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-06-27 Don Porter + * doc/dde.n: Work in progress updating the documentation + * doc/http.n: of the packages that come bundled with + * doc/msgcat.n: the Tcl source distribution, notably tcltest. + * doc/registry.n: + * doc/tcltest.n: + * library/tcltest/tcltest.tcl: Made sure that the TCLTEST_OPTIONS environment variablle configures tcltest at package load time. diff --git a/doc/dde.n b/doc/dde.n index d328213..19b1e66 100644 --- a/doc/dde.n +++ b/doc/dde.n @@ -5,10 +5,10 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dde.n,v 1.7 2001/08/22 23:56:14 hobbs Exp $ +'\" RCS: @(#) $Id: dde.n,v 1.8 2002/06/27 22:29:08 dgp Exp $ '\" .so man.macros -.TH dde n 8.4 Tcl "Tcl Built-In Commands" +.TH dde n 1.2 dde "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME diff --git a/doc/http.n b/doc/http.n index b0e71d3..f3e45d6 100644 --- a/doc/http.n +++ b/doc/http.n @@ -5,14 +5,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: http.n,v 1.15 2002/04/18 16:46:24 dgp Exp $ +'\" RCS: @(#) $Id: http.n,v 1.16 2002/06/27 22:29:08 dgp Exp $ '\" .so man.macros -.TH "Http" n 8.3 Tcl "Tcl Built-In Commands" +.TH "http" n 2.4 http "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -Http \- Client-side implementation of the HTTP/1.0 protocol. +http \- Client-side implementation of the HTTP/1.0 protocol. .SH SYNOPSIS \fBpackage require http ?2.4?\fR .sp diff --git a/doc/msgcat.n b/doc/msgcat.n index 614c2b5..cba5a45 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -7,7 +7,7 @@ '\" SCCS: @(#) msgcat.n '\" .so man.macros -.TH "msgcat" n 8.1 Tcl "Tcl Built-In Commands" +.TH "msgcat" n 1.3 msgcat "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME diff --git a/doc/registry.n b/doc/registry.n index f0e199f..cfb5ca2 100644 --- a/doc/registry.n +++ b/doc/registry.n @@ -4,10 +4,10 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: registry.n,v 1.4 1999/04/16 00:46:35 stanton Exp $ +'\" RCS: @(#) $Id: registry.n,v 1.5 2002/06/27 22:29:08 dgp Exp $ '\" .so man.macros -.TH registry n 8.0 Tcl "Tcl Built-In Commands" +.TH registry n 1.0 registry "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME diff --git a/doc/tcltest.n b/doc/tcltest.n index e4009bd..955f2eb 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -3,98 +3,83 @@ '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" Copyright (c) 1998-1999 Scriptics Corporation '\" Copyright (c) 2000 Ajuba Solutions +'\" Contributions from Don Porter, NIST, 2002. (not subject to US copyright) '\" '\" 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.19 2002/06/06 20:54:03 dgp Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.20 2002/06/27 22:29:08 dgp Exp $ '\" .so man.macros -.TH "tcltest" n 8.4 Tcl "Tcl Built-In Commands" +.TH "tcltest" n 2.1 tcltest "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME tcltest \- Test harness support code and utilities .SH SYNOPSIS +.nf \fBpackage require tcltest ?2.1?\fR .sp \fBtcltest::test \fIname desc ?option value? ?option value? ...\fR -.br +\fBtcltest::test \fIname desc constraints body result\fR \fBtcltest::test \fIname desc {?option value? ?option value? ...}\fR .sp +\fBtcltest::makeDirectory \fIname ?directory?\fR +\fBtcltest::removeDirectory \fIname ?directory?\fR +\fBtcltest::makeFile \fIcontents name ?directory?\fR +\fBtcltest::removeFile \fIname ?directory?\fR +\fBtcltest::viewFile \fIname ?directory?\fR +\fBtcltest::loadTestedCommands\fR \fBtcltest::cleanupTests \fI?runningMultipleTests?\fR -.sp \fBtcltest::runAllTests\fR .sp +.VS 2.1 +\fBtcltest::configure \fI?option? ?value option value ...?\fR +.VE +\fBtcltest::testConstraint \fIconstraint ?value?\fR +.VS 2.1 +\fBtcltest::customMatch \fImode command\fR +.VE +\fBtcltest::outputChannel \fI?channelID?\fR +\fBtcltest::errorChannel \fI?channelID?\fR \fBtcltest::interpreter \fI?interp?\fR .sp -\fBtcltest::singleProcess \fI?value?\fR -.sp \fBtcltest::debug \fI?level?\fR -.sp -\fBtcltest::verbose \fI?levelList?\fR -.sp -\fBtcltest::preserveCore \fI?level?\fR -.sp -\fBtcltest::customMatch \fImode command\fR -.sp -\fBtcltest::testConstraint \fIconstraint ?value?\fR -.sp +\fBtcltest::errorFile \fI?filename?\fR \fBtcltest::limitConstraints \fI?value?\fR -.sp -\fBtcltest::workingDirectory \fI?dir?\fR -.sp -\fBtcltest::temporaryDirectory \fI?dir?\fR -.sp -\fBtcltest::testsDirectory \fI?dir?\fR -.sp +\fBtcltest::loadFile \fI?filename?\fR +\fBtcltest::loadScript \fI?script?\fR \fBtcltest::match \fI?patternList?\fR -.sp -\fBtcltest::matchFiles \fI?patternList?\fR -.sp \fBtcltest::matchDirectories \fI?patternList?\fR -.sp +\fBtcltest::matchFiles \fI?patternList?\fR +\fBtcltest::outputFile \fI?filename?\fR +\fBtcltest::preserveCore \fI?level?\fR +\fBtcltest::singleProcess \fI?value?\fR \fBtcltest::skip \fI?patternList?\fR -.sp -\fBtcltest::skipFiles \fI?patternList?\fR -.sp \fBtcltest::skipDirectories \fI?patternList?\fR +\fBtcltest::skipFiles \fI?patternList?\fR +\fBtcltest::temporaryDirectory \fI?dir?\fR +\fBtcltest::testsDirectory \fI?dir?\fR +\fBtcltest::verbose \fI?levelList?\fR .sp -\fBtcltest::loadTestedCommands\fR -.sp -\fBtcltest::loadScript \fI?script?\fR -.sp -\fBtcltest::loadFile \fI?filename?\fR -.sp -\fBtcltest::outputChannel \fI?channelID?\fR -.sp -\fBtcltest::outputFile \fI?filename?\fR -.sp -\fBtcltest::errorChannel \fI?channelID?\fR -.sp -\fBtcltest::errorFile \fI?filename?\fR -.sp -\fBtcltest::makeFile \fIcontents name ?directory?\fR -.sp -\fBtcltest::removeFile \fIname ?directory?\fR -.sp -\fBtcltest::makeDirectory \fIname ?directory?\fR -.sp -\fBtcltest::removeDirectory \fIname ?directory?\fR -.sp -\fBtcltest::viewFile \fIname ?directory?\fR -.sp +\fBtcltest::bytestring \fIstring\fR \fBtcltest::normalizeMsg \fImsg\fR -.sp \fBtcltest::normalizePath \fIpathVar\fR -.sp -\fBtcltest::bytestring \fIstring\fR +\fBtcltest::workingDirectory \fI?dir?\fR +.fi .BE .SH DESCRIPTION .PP -The \fBtcltest\fR package provides the user with utility tools for -writing and running tests in the Tcl test suite. It can also be used -to create a customized test harness for an extension. +The \fBtcltest\fR package provides several utility commands useful +in the construction of test suites for code instrumented to be +run by evaluation of Tcl commands. Notably the built-in commands +of the Tcl library itself are tested by a test suite using the +tcltest package. + + + + + .PP The Tcl test suite consists of multiple .test files, each of which contains multiple test cases. Each test case consists of a call to @@ -391,7 +376,7 @@ names. This makes the behavior of the second form different from the first form in some cases. .PP The first form for the \fBtest\fR command: -.DS +.CS test \fIname\fR \fIdescription\fR ?-constraints \fIkeywordList|expression\fR ?-setup \fIsetupScript\fR? @@ -402,10 +387,10 @@ test \fIname\fR \fIdescription\fR ?-errorOutput \fIexpectedError\fR? ?-returnCodes \fIcodeList\fR? ?-match \fImode\fR? -.DE +.CE .PP The second form for the \fBtest\fR command (adds brace grouping): -.DS +.CS test \fIname\fR \fIdescription\fR { ?-constraints \fIkeywordList|expression\fR ?-setup \fIsetupScript\fR? @@ -417,11 +402,11 @@ test \fIname\fR \fIdescription\fR { ?-returnCodes \fIcodeList\fR? ?-match \fImode\fR? } -.DE +.CE The \fIname\fR argument should follow the pattern: -.DS +.CS -. -.DE +.CE For white-box (regression) tests, the target should be the name of the C function or Tcl procedure being tested. For black-box tests, the target should be the name of the feature being tested. Related tests @@ -622,9 +607,9 @@ test can only be run if the current app can be spawned via a pipe .SH "RUNNING TEST FILES" Use the following command to run a test file that uses package tcltest: -.DS +.CS ?