From c750824920529a5930ca3a8c4301a9cf9c45d6a4 Mon Sep 17 00:00:00 2001 From: jenn Date: Sat, 26 Jun 1999 03:54:09 +0000 Subject: Modified the tests to use the package tcltest --- tests/README | 345 +-------------- tests/all.tcl | 12 +- tests/append.test | 5 +- tests/assocd.test | 5 +- tests/async.test | 5 +- tests/autoMkindex.test | 12 +- tests/basic.test | 5 +- tests/binary.test | 5 +- tests/case.test | 5 +- tests/clock.test | 5 +- tests/cmdAH.test | 5 +- tests/cmdIL.test | 5 +- tests/cmdInfo.test | 5 +- tests/cmdMZ.test | 5 +- tests/compExpr-old.test | 5 +- tests/compExpr.test | 5 +- tests/compile.test | 5 +- tests/concat.test | 5 +- tests/dcall.test | 5 +- tests/defs.tcl | 1087 ---------------------------------------------- tests/dstring.test | 5 +- tests/encoding.test | 5 +- tests/env.test | 7 +- tests/error.test | 5 +- tests/eval.test | 5 +- tests/event.test | 5 +- tests/exec.test | 201 ++++----- tests/execute.test | 6 +- tests/expr-old.test | 5 +- tests/expr.test | 5 +- tests/fCmd.test | 5 +- tests/fileName.test | 5 +- tests/for-old.test | 5 +- tests/for.test | 5 +- tests/foreach.test | 5 +- tests/format.test | 5 +- tests/get.test | 5 +- tests/history.test | 5 +- tests/http.test | 11 +- tests/httpold.test | 5 +- tests/if-old.test | 5 +- tests/if.test | 5 +- tests/incr-old.test | 5 +- tests/incr.test | 5 +- tests/indexObj.test | 5 +- tests/info.test | 5 +- tests/init.test | 10 +- tests/interp.test | 5 +- tests/io.test | 121 +++--- tests/ioCmd.test | 5 +- tests/ioUtil.test | 5 +- tests/join.test | 5 +- tests/lindex.test | 5 +- tests/link.test | 5 +- tests/linsert.test | 5 +- tests/list.test | 5 +- tests/listObj.test | 5 +- tests/llength.test | 5 +- tests/load.test | 5 +- tests/lrange.test | 5 +- tests/lreplace.test | 5 +- tests/lsearch.test | 5 +- tests/macFCmd.test | 5 +- tests/misc.test | 5 +- tests/msgcat.test | 5 +- tests/namespace-old.test | 5 +- tests/namespace.test | 5 +- tests/obj.test | 5 +- tests/opt.test | 5 +- tests/osa.test | 5 +- tests/parse.test | 5 +- tests/parseExpr.test | 5 +- tests/parseOld.test | 5 +- tests/pid.test | 5 +- tests/pkg.test | 7 +- tests/pkgMkIndex.test | 9 +- tests/platform.test | 3 +- tests/proc-old.test | 5 +- tests/proc.test | 5 +- tests/pwd.test | 5 +- tests/reg.test | 5 +- tests/regexp.test | 7 +- tests/registry.test | 5 +- tests/rename.test | 5 +- tests/resource.test | 5 +- tests/result.test | 3 +- tests/safe.test | 5 +- tests/scan.test | 5 +- tests/security.test | 5 +- tests/set-old.test | 5 +- tests/set.test | 5 +- tests/socket.test | 59 +-- tests/source.test | 5 +- tests/split.test | 5 +- tests/stack.test | 5 +- tests/string.test | 5 +- tests/stringObj.test | 5 +- tests/subst.test | 5 +- tests/switch.test | 5 +- tests/thread.test | 5 +- tests/timer.test | 5 +- tests/trace.test | 5 +- tests/unixFCmd.test | 5 +- tests/unixFile.test | 5 +- tests/unixInit.test | 21 +- tests/unixNotfy.test | 5 +- tests/unknown.test | 5 +- tests/uplevel.test | 5 +- tests/upvar.test | 5 +- tests/utf.test | 5 +- tests/util.test | 5 +- tests/var.test | 5 +- tests/while-old.test | 5 +- tests/while.test | 5 +- tests/winConsole.test | 5 +- tests/winDde.test | 5 +- tests/winFCmd.test | 5 +- tests/winFile.test | 5 +- tests/winNotify.test | 5 +- tests/winPipe.test | 33 +- tests/winTime.test | 5 +- 121 files changed, 597 insertions(+), 1872 deletions(-) delete mode 100644 tests/defs.tcl diff --git a/tests/README b/tests/README index e8fb992..0c3b3cf 100644 --- a/tests/README +++ b/tests/README @@ -1,19 +1,12 @@ README -- Tcl test suite design document. -RCS: @(#) $Id: README,v 1.5 1999/04/21 21:50:29 rjohnson Exp $ +RCS: @(#) $Id: README,v 1.6 1999/06/26 03:54:09 jenn Exp $ Contents: --------- 1. Introduction - 2. Definitions file - 3. Writing a new test - 4. Constraints - 5. Adding a New Test File - 6. Test output - 7. Selecting tests for execution within a file - 8. Selecting files to be sourced by all.tcl - 9. Incompatibilities with prior Tcl versions + 2. Incompatibilities with prior Tcl versions 1. Introduction: ---------------- @@ -64,229 +57,17 @@ You can run the tests in three ways: ::tcltest::testConfig(knownBug) ::tcltest::testConfig(userInteractive) -In all cases, no output will be generated if all goes well, except for -a listing of the test files and a statistical summary. If there are -errors, then additional messages will appear in the format described -below. Note that some tests will be skipped if you run as superuser. +Please see the tcltest man page for more information regarding how to +write and run tests. -This approach to testing was designed and initially implemented by -Mary Ann May-Pumphrey of Sun Microsystems in the early 1990's. Many -thanks to her for donating her work back to the public Tcl release. - - -2. Definitions file: --------------------- - -The file "defs.tcl" defines the "tcltest" namespace which contains a -collection of procedures and variables used to run the tests. It is -read in automatically by each of the .test files if needed, but once -it has been read once it will not be read again by the .test files. -Currently, the following procedures are exported from the "tcltest" -namespace and automatically imported: - - test Run a test script. - - cleanupTests Print stats and remove files created by tests. - - dotests Source a test file and run tests of the - specified pattern. - - makeFile Create a file--the file will automatically - be removed by cleanupTests. - - removeFile Force a file to be removed. - - makeDirectory Create a directory--the directory will - automatically be removed by cleanupTests. - - removeDirectory Force a directory to be removed. - - viewFile Returns the contents of a file. - - normalizeMsg Remove extra newlines from a string. - - bytestring Construct a string that consists of the - requested sequence of bytes, as opposed to a - string of properly formed UTF-8 characters. - - set_iso8859_1_locale Set the locale to iso8859_1. - - restore_locale Restore the locale to its original setting. - - saveState Save the procedure and global variable names. - - restoreState Restore the procedure and global variable names. - - threadReap Kill all threads except for the main thread. - -Please refer to the defs.tcl file for more documentation on these -procedures. - - -3. Writing a new test: ----------------------- - -The test procedure runs a test script and prints an error message if -the script's result does not match the expected result. The following -is the spec for the "test" command: - - test ??