This file describes the flex tests.
-
WHO SHOULD USE THE TESTS
The test suite is intended to be used by flex developers, i.e., anyone hacking
the flex distribution. If you are simply installing flex, then you can ignore
this directory and its contents.
-
STRUCTURE OF THE TESTS
The test suite consists of several flex scanners, one per directory, known
returns an error or generates an error message, then your modifications *may*
have broken a feature of flex.
-
HOW TO RUN THE TESTS
To build and execute all tests:
- $ cd TESTS/
- $ make
+ $ cd tests/ # from the top level of the flex source tree
$ make check
-
To build and execute a single test:
- $ cd TESTS/
- $ cd test-pthread-nr
+ $ cd tests/ #from the top level of the flex tree
+ $ cd test-pthread-nr # for example
$ make
$ make check
-
HOW TO ADD A NEW TEST
- - Copy the TESTS/TEMPLATE directory, then
- modify the skeleton scanner (and parser if necessary).
+ - Copy the tests/TEMPLATE directory, then modify the skeleton scanner
+ (and parser if necessary). If you are submitting a patch for
+ inclusion in the flex distribution, then move the file "cvsignore"
+ to .cvsignore in your new test-* subdirectory and add the name of
+ your directory on a line by itself at the end of the newly created
+ .cvsignore file. This will make it easier on the flex maintainer to
+ include your new test in the cvs tree.
- On success, your test should return zero.
On error, your test should return non-zero and print a message
- to stderr.
+ to stderr. Hopefullly, your error message will indicate something
+ helpful to explain why the test failed.
- - You must modify the last few lines of TESTS/Makefile.in
+ - You must modify the last few lines of tests/Makefile.in
by adding your new test directory, and the Makefile target.
- Each test assumes that the newly-built binary "flex" is in the
- directory above the TESTS directory.
+ directory above the tests directory.
+
+ - Add a description of your new test to the end of this file.
DESCRIPTION OF TESTS
string-nr - Scan strings, non-reentrant.
string-r - Scan strings, reentrant.
yyextra - User-specific data in reentrant scanner.
-
-