home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 December / PCWorld_2000-12_cd.bin / Komunikace / Comanche / xuibuilder / TclDOM-1.6 / tests / README < prev    next >
Text File  |  2000-11-02  |  4KB  |  107 lines

  1. TclDOM Test Suite
  2. -----------------
  3.  
  4. Adapted from Tcl test Suite, see included README below.
  5.  
  6. To run the tests, type "tclsh8.0 all" or "tclsh8.1 all" 
  7. to use either Tcl 8.0 or Tcl 8.1 respectively.
  8.  
  9. ====================================================================
  10.  
  11. Tcl Test Suite
  12. --------------
  13.  
  14. SCCS: @(#) README 1.6 96/04/17 10:51:11
  15.  
  16. This directory contains a set of validation tests for the Tcl
  17. commands.  Each of the files whose name ends in ".test" is
  18. intended to fully exercise one or a few Tcl commands.  The
  19. commands tested by a given file are listed in the first line
  20. of the file.
  21.  
  22. You can run the tests in two ways:
  23.     (a) type "make test" in ../unix; this will run all of the tests.
  24.     (b) start up tcltest in this directory, then "source" the test
  25.         file (for example, type "source parse.test").  To run all
  26.     of the tests, type "source all".
  27. In either case no output will be generated if all goes well, except
  28. for a listing of the tests..  If there are errors then additional
  29. messages will appear in the format described below.  Note: don't
  30. run the tests as superuser, since this will cause several of the tests
  31. to fail.
  32.  
  33. The rest of this file provides additional information on the
  34. features of the testing environment.
  35.  
  36. This approach to testing was designed and initially implemented
  37. by Mary Ann May-Pumphrey of Sun Microsystems.  Many thanks to
  38. her for donating her work back to the public Tcl release.
  39.  
  40. Definitions file:
  41. -----------------
  42.  
  43. The file "defs" defines a collection of procedures and variables
  44. used to run the tests.  It is read in automatically by each of the
  45. .test files if needed, but once it has been read once it will not
  46. be read again by the .test files.  If you change defs while running
  47. tests you'll have to "source" it by hand to load its new contents.
  48.  
  49. Test output:
  50. ------------
  51.  
  52. Normally, output only appears when there are errors.  However, if
  53. the variable VERBOSE is set to 1 then tests will be run in "verbose"
  54. mode and output will be generated for each test regardless of
  55. whether it succeeded or failed.  Test output consists of the
  56. following information:
  57.  
  58.     - the test identifier (which can be used to locate the test code
  59.         in the .test file)
  60.     - a brief description of the test
  61.     - the contents of the test code
  62.     - the actual results produced by the tests
  63.     - a "PASSED" or "FAILED" message
  64.     - the expected results (if the test failed)
  65.  
  66. You can set VERBOSE either interactively (after the defs file has been
  67. read in), or you can change the default value in "defs".
  68.  
  69. Selecting tests for execution:
  70. ------------------------------
  71.  
  72. Normally, all the tests in a file are run whenever the file is
  73. "source"d.  However, you can select a specific set of tests using
  74. the global variable TESTS.  This variable contains a pattern;  any
  75. test whose identifier matches TESTS will be run.  For example,
  76. the following interactive command causes all of the "for" tests in
  77. groups 2 and 4 to be executed:
  78.  
  79.     set TESTS {for-[24]*}
  80.  
  81. TESTS defaults to *, but you can change the default in "defs" if
  82. you wish.
  83.  
  84. Saving keystrokes:
  85. ------------------
  86.  
  87. A convenience procedure named "dotests" is included in file
  88. "defs".  It takes two arguments--the name of the test file (such
  89. as "parse.test"), and a pattern selecting the tests you want to
  90. execute.  It sets TESTS to the second argument, calls "source" on
  91. the file specified in the first argument, and restores TESTS to
  92. its pre-call value at the end.
  93.  
  94. Batch vs. interactive execution:
  95. --------------------------------
  96.  
  97. The tests can be run in either batch or interactive mode.  Batch
  98. mode refers to using I/O redirection from a UNIX shell.  For example,
  99. the following command causes the tests in the file named "parse.test"
  100. to be executed:
  101.  
  102.     tclTest < parse.test > parse.test.results
  103.  
  104. Users who want to execute the tests in this fashion need to first
  105. ensure that the file "defs" has proper values for the global
  106. variables that control the testing environment (VERBOSE and TESTS).
  107.