os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/README
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/README	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,109 @@
     1.4 +README -- Tcl test suite design document.
     1.5 +
     1.6 +RCS: @(#) $Id: README,v 1.11.2.1 2003/04/01 21:13:07 dgp Exp $
     1.7 +
     1.8 +Contents:
     1.9 +---------
    1.10 +
    1.11 +    1. Introduction
    1.12 +    2. Running tests
    1.13 +    3. Adding tests
    1.14 +    4. Incompatibilities with prior Tcl versions
    1.15 +
    1.16 +1. Introduction:
    1.17 +----------------
    1.18 +
    1.19 +This directory contains a set of validation tests for the Tcl commands
    1.20 +and C Library procedures for Tcl.  Each of the files whose name ends
    1.21 +in ".test" is intended to fully exercise the functions in the C source
    1.22 +file that corresponds to the file prefix.  The C functions and/or Tcl
    1.23 +commands tested by a given file are listed in the first line of the
    1.24 +file.
    1.25 +
    1.26 +2. Running tests:
    1.27 +-----------------
    1.28 +
    1.29 +We recommend that you use the "test" target of Tcl's Makefile to run
    1.30 +the test suite.  From the directory in which you build Tcl, simply
    1.31 +type "make test".  This will create a special executable named
    1.32 +tcltest in which the testing scripts will be evaluated.  To create
    1.33 +the tcltest executable without running the test suite, simple type
    1.34 +"make tcltest".
    1.35 +
    1.36 +All the configuration options of the tcltest package are available
    1.37 +during a "make test" by defining the TESTFLAGS environment variable.
    1.38 +For example,if you wish to run only those tests in the file append.test,
    1.39 +you can type:
    1.40 +
    1.41 +	make test TESTFLAGS="-file append.test"
    1.42 +
    1.43 +For interactive testing, the Tcl Makefile provides the "runtest" target.
    1.44 +Type "make runtest" in your build directory, and the tcltest executable
    1.45 +will be created, if necessary, then it will run interactively.  At the
    1.46 +command prompt, you may type any Tcl commands.  If you type
    1.47 +"source ../tests/all.tcl", the test suite will run.  You may use the
    1.48 +tcltest::configure command to configure the test suite run as an
    1.49 +alternative to command line options via TESTFLAGS.  You might also
    1.50 +wish to use the tcltest::testConstraint command to select the constraints
    1.51 +that govern which tests are run.  See the documentation for the tcltest
    1.52 +package for details.
    1.53 +
    1.54 +3. Adding tests:
    1.55 +----------------
    1.56 +
    1.57 +Please see the tcltest man page for more information regarding how to
    1.58 +write and run tests.
    1.59 +
    1.60 +Please note that the all.tcl file will source your new test file if
    1.61 +the filename matches the tests/*.test pattern (as it should).  The
    1.62 +names of test files that contain regression (or glass-box) tests
    1.63 +should correspond to the Tcl or C code file that they are testing.
    1.64 +For example, the test file for the C file "tclCmdAH.c" is
    1.65 +"cmdAH.test".  Test files that contain black-box tests may not
    1.66 +correspond to any Tcl or C code file so they should match the pattern
    1.67 +"*_bb.test". 
    1.68 +
    1.69 +Be sure your new test file can be run from any working directory.
    1.70 +
    1.71 +Be sure no temporary files are left behind by your test file.
    1.72 +Use [tcltest::makeFile], [tcltest::removeFile], and [tcltest::cleanupTests]
    1.73 +properly to be sure of this.
    1.74 +
    1.75 +Be sure your tests can run cross-platform in both a build environment
    1.76 +as well as an installation environment.  If your test file contains
    1.77 +tests that should not be run in one or more of those cases, please use
    1.78 +the constraints mechanism to skip those tests.
    1.79 +
    1.80 +4. Incompatibilities of package tcltest 2.1 with 
    1.81 +   testing machinery of very old versions of Tcl:
    1.82 +------------------------------------------------
    1.83 +
    1.84 +1) Global variables such as VERBOSE, TESTS, and testConfig of the
    1.85 +   old machinery correspond to the [configure -verbose], 
    1.86 +   [configure -match], and [testConstraint] commands of tcltest 2.1,
    1.87 +   respectively.
    1.88 +
    1.89 +2) VERBOSE values were longer numeric.  [configure -verbose] values
    1.90 +   are lists of keywords.
    1.91 +
    1.92 +3) When you run "make test", the working dir for the test suite is now
    1.93 +   the one from which you called "make test", rather than the "tests"
    1.94 +   directory.  This change allows for both unix and windows test
    1.95 +   suites to be run simultaneously without interference with each
    1.96 +   other or with existing files.  All tests must now run independently
    1.97 +   of their working directory.
    1.98 +
    1.99 +4) The "all" file is now called "all.tcl"
   1.100 +
   1.101 +5) The "defs" and "defs.tcl" files no longer exist.
   1.102 +
   1.103 +6) Instead of creating a doAllTests file in the tests directory, to
   1.104 +   run all nonPortable tests, just use the "-constraints nonPortable"
   1.105 +   command line flag.  If you are running interactively, you can run
   1.106 +   [tcltest::testConstraint nonPortable 1] (after loading the tcltest
   1.107 +   package).
   1.108 +
   1.109 +7) Direct evaluation of the *.test files by the "source" command is no
   1.110 +   longer recommended.  Instead, "source all.tcl" and use the "-file" and
   1.111 +   "-notfile" options of tcltest::configure to control which *.test files
   1.112 +   are evaluated.