diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 17:21:04 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 17:21:04 -0800 |
commit | e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2 (patch) | |
tree | ce4c73521220fbb751c2be6a42e85ff6a6cbff97 /tests/README | |
download | expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.gz expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.bz2 expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.zip |
Imported Upstream version 5.45upstream/5.45
Diffstat (limited to 'tests/README')
-rw-r--r-- | tests/README | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..e204c6b --- /dev/null +++ b/tests/README @@ -0,0 +1,120 @@ +Expect Test Suite +----------------- + +This directory contains a set of validation tests for the Expect +commands. Each of the files whose name ends in ".test" is intended to +fully exercise one or a few Expect commands. The commands tested by a +given file are listed in the first line of the file. + +You can run the tests in three ways: + + (a) type "make test" in the parent directory to this one; this + will run all of the tests. + + (b) type "expect <testFile> ?<option> <value>? + Command line options include: + + -help display usage information + + -verbose <level> set the level of verbosity to a substring + of "bps". See the "Test output" section + of the tcltest man page for an + explanation of this option. + + -match <matchList> only run tests that match one or more of + the glob patterns in <matchList> + + -skip <skipList> do not run tests that match one or more + of the glob patterns in <skipList> + + -file <globPatternList> + only source test files that match one or + more of the glob patterns in + <globPatternList> (relative to the + "tests" directory). This option only + applies when you run the test suite with + the "all.tcl" file. + + -notfile <globPatternList> + do not source test files that match one + or more of the patterns in + <globPatternList> (relative to the + "tests" directory). This option only + applies when you run the test suite with + the "all.tcl" file. + + -constraints <list> tests with any constraints in <list> will + not be skipped. Not that elements of + <list> must exactly match the existing + constraints. + + -limitconstraints <bool> + If 1, limit test runs to those tests that + match the constraints listed using the + -constraints flag. Use of this flag + requires use of the -constraints flag. + The default value is 0. + + -tmpdir <dirname> put temporary files created by + ::tcltest::makeFile and + ::tcltest::makeDirectory in the named + directory. The default location is + ::tcltest::workingDirectory. + + -preservecore <level> + check for core files. If level is 0, + check for core files only when + cleanupTests is called from an all.tcl + file. If 1, also check at the end of + every test command. If 2, also save core + files in ::tcltest::temporaryDirectory. + The default level is 0. + + (c) start up expect in this directory, then "source" the test + file (for example, type "source parse.test"). To run all + of the tests, type "source all.tcl". To use the options in + interactive mode, you can set their corresponding tcltest + namespace variables after loading the tcltest package. + For example, some of the tcltest variables are: + ::tcltest::match + ::tcltest::skip + ::tcltest::testConstraints(nonPortable) + ::tcltest::testConstraints(knownBug) + ::tcltest::testConstraints(userInteractive) + +Please see the man page for the 'tcltest' package for more detailed +information on the features of the testing environment. + +This approach to testing was copied from the Tcl distribution. + +Incompatibilities with prior versions +------------------------------------- + +1) Global variables such as VERBOSE, TESTS, and testConfig are now + renamed to use the new "tcltest" namespace. + + old name new name + -------- -------- + VERBOSE ::tcltest::verbose + TESTS ::tcltest::match + testConfig ::tcltest::testConstraints + +2) VERBOSE values are no longer numeric. + +3) When you run "make test", the working dir for the test suite is now + the one from which you called "make test", rather than the "tests" + directory. This change allows for both unix and windows test + suites to be run simultaneously without interference with each + other or with existing files. All tests must now run independently + of their working directory. + +4) The "all" file is now called all.tcl. + +5) The "defs" file no longer exists. + +6) Instead of creating a doAllTests file in the tests directory, to + run all nonPortable tests, just use the "-constraints nonPortable" + command line flag. If you are running interactively, you can set + the ::tcltest::testConstraints(nonPortable) variable to 1 (after + loading the tcltest package). + |