📄 readme
字号:
Tcl Test Suite--------------SCCS: @(#) README 1.6 96/04/17 10:51:11This directory contains a set of validation tests for the Tclcommands. Each of the files whose name ends in ".test" isintended to fully exercise one or a few Tcl commands. Thecommands tested by a given file are listed in the first lineof the file.You can run the tests in two ways: (a) type "make test" in ../unix; this will run all of the tests. (b) start up tcltest in this directory, then "source" the test file (for example, type "source parse.test"). To run all of the tests, type "source all".In either case no output will be generated if all goes well, exceptfor a listing of the tests.. If there are errors then additionalmessages will appear in the format described below. Note: don'trun the tests as superuser, since this will cause several of the teststo fail.The rest of this file provides additional information on thefeatures of the testing environment.This approach to testing was designed and initially implementedby Mary Ann May-Pumphrey of Sun Microsystems. Many thanks toher for donating her work back to the public Tcl release.Definitions file:-----------------The file "defs" defines a collection of procedures and variablesused 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 notbe read again by the .test files. If you change defs while runningtests you'll have to "source" it by hand to load its new contents.Test output:------------Normally, output only appears when there are errors. However, ifthe variable VERBOSE is set to 1 then tests will be run in "verbose"mode and output will be generated for each test regardless ofwhether it succeeded or failed. Test output consists of thefollowing information: - the test identifier (which can be used to locate the test code in the .test file) - a brief description of the test - the contents of the test code - the actual results produced by the tests - a "PASSED" or "FAILED" message - the expected results (if the test failed)You can set VERBOSE either interactively (after the defs file has beenread in), or you can change the default value in "defs".Selecting tests for execution:------------------------------Normally, all the tests in a file are run whenever the file is"source"d. However, you can select a specific set of tests usingthe global variable TESTS. This variable contains a pattern; anytest whose identifier matches TESTS will be run. For example,the following interactive command causes all of the "for" tests ingroups 2 and 4 to be executed: set TESTS {for-[24]*}TESTS defaults to *, but you can change the default in "defs" ifyou wish.Saving keystrokes:------------------A convenience procedure named "dotests" is included in file"defs". It takes two arguments--the name of the test file (suchas "parse.test"), and a pattern selecting the tests you want toexecute. It sets TESTS to the second argument, calls "source" onthe file specified in the first argument, and restores TESTS toits pre-call value at the end.Batch vs. interactive execution:--------------------------------The tests can be run in either batch or interactive mode. Batchmode refers to using I/O redirection from a UNIX shell. For example,the following command causes the tests in the file named "parse.test"to be executed: tclTest < parse.test > parse.test.resultsUsers who want to execute the tests in this fashion need to firstensure that the file "defs" has proper values for the globalvariables that control the testing environment (VERBOSE and TESTS).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -