From 6a4211168cd8e6e5bc8214bc4e2b4ac75f6fd977 Mon Sep 17 00:00:00 2001 From: jenn Date: Tue, 19 Oct 1999 18:08:35 +0000 Subject: * tests/tcltest.test: * doc/tcltest.n: * library/tcltest1.0/tcltest.tcl: Removed the extra return at the end of the tcltest.tcl file. Applied patches sent in by Andreas Kupries to add helper procs for debug output, add 3 new flags (-testsdir, -load, -loadfile), and internally refactors common code for dealing with paths into separate procedures. [Bug: 2838, 2842] --- ChangeLog | 34 ++++ doc/tcltest.n | 35 +++- library/tcltest/tcltest.tcl | 443 ++++++++++++++++++++++++++++++----------- library/tcltest1.0/tcltest.tcl | 443 ++++++++++++++++++++++++++++++----------- tests/autoMkindex.test | 8 +- tests/basic.test | 6 +- tests/pkgMkIndex.test | 20 +- tests/socket.test | 3 +- tests/tcltest.test | 50 ++++- tests/unixInit.test | 5 +- tests/unixNotfy.test | 8 +- 11 files changed, 790 insertions(+), 265 deletions(-) diff --git a/ChangeLog b/ChangeLog index 004bc16..b2403a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,21 @@ +1999-10-19 Jennifer Hom + + * tests/tcltest.test: + * doc/tcltest.n: + * library/tcltest1.0/tcltest.tcl: Removed the extra return at the + end of the tcltest.tcl file. + + Applied patches sent in by Andreas Kupries to add helper procs for + debug output, add 3 new flags (-testsdir, -load, -loadfile), and + internally refactors common code for dealing with paths into + separate procedures. [Bug: 2838, 2842] + 1999-10-12 Jim Ingham * mac/tclMacLoad.c: Stupid bug - we converted the filename to external, but used the unconverted version. * mac/tclMacFCmd.c: Fix a merge error in the bug fix for [Bug: 2869] + 1999-10-12 Jeff Hobbs * generic/regc_color.c: @@ -147,6 +160,12 @@ * generic/tclCmdMZ.c: changed [string equal] to return an Int type object (was a Boolean) +1999-09-01 Jennifer Hom + + * library/tcltest1.0/tcltest.tcl: Process command-line arguments + only ::tcltest doesn't have a child namespace (requires that + command-line args are processed in that namespace) + 1999-09-01 Jeff Hobbs * generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD @@ -173,6 +192,14 @@ 1999-08-27 Jennifer Hom + * tests/env.test: + * tests/exec.test: + * tests/io.test: + * tests/event.test: + * tests/tcltest.test: Added 'exit' calls to scripts that the tests + themselves write, and removed accidental checkin of knownBugThreaded + constraints for Solaris and Linux. + * library/tcltest1.0/tcltest.tcl: Modified tcltest so that variables are only initialized to their default values if they did not previously exist. @@ -374,6 +401,13 @@ instead to send a message to the socket event window to tell it to terminate its thread. +1999-07-30 Jennifer Hom + + * tests/tcltest.test: + * library/tcltest1.0/tcltest.tcl: Exit with non-zero status if + there were problems with the way the test suite was started + (e.g. wrong # arguments). + 1999-07-30 Jeff Hobbs * generic/tclInt.decls: added declaractions necessary for the diff --git a/doc/tcltest.n b/doc/tcltest.n index 99f354d..56f10a8 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -6,7 +6,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.6 1999/08/31 01:48:25 jenn Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.7 1999/10/19 18:08:40 jenn Exp $ '\" .so man.macros .TH "Tcltest" n 8.2 Tcl "Tcl Built-In Commands" @@ -23,6 +23,8 @@ Tcltest \- Test harness support code and utilities .sp \fB::tcltest::getMatchingTestFiles\fR .sp +\fB::tcltest::loadTestedCommands\fR +.sp \fB::tcltest::makeFile \fIcontents name\fR .sp \fB::tcltest::removeFile \fIname\fR @@ -96,6 +98,12 @@ This command is used when you want to run multiple test files. It returns the list of tests that should be sourced in an 'all.tcl' file. See the section \fI"Running test files"\fR for more information. .TP +\fB::tcltest::loadTestedCommands\fP +This command uses the script specified via the \fI-load\fR or +\fI-loadfile\fR to load the commands checked by the test suite. +Allowed to be empty, as the tested commands could have been compiled +into the interpreter running the test suite. +.TP \fB::tcltest::makeFile\fP \fIcontents name\fR Create a file that will be automatically be removed by \fB::tcltest::cleanupTests\fR at the end of a test file. @@ -250,11 +258,16 @@ specified using -tmpdir on the command line. \fB::tcltest::testsDirectory\fR where the tests reside - defaults to \fI::tcltest::workingDirectory\fR if the script cannot determine where the \fItests\fR directory is -located. This variable should be explicitly set if tests are being -run from an all.tcl file. +located. It is possible to change the default by specifying +\fI-testdir\fR on the commandline. This variable should be +explicitly set if tests are being run from an all.tcl file. .TP \fB::tcltest::tcltest\fR -the name of the executable used to invoke the test suite. +the name of the executable used to invoke the test suite. +.TP +\fB::tcltest::loadScript\fR +The script executed \fBloadTestedCommands\fR. Specified either by +\fI-load\fR or \fI-loadfile\fR. .SH "TEST CONSTRAINTS" Constraints are used to determine whether a test should be skipped. Each constraint is stored as an index in the array @@ -433,10 +446,24 @@ interested in running only those tests that are constrained to be unixOnly and no other tests. (::tcltest::limitConstraints) .TP +\fB-load