/
niceSOFT
/
flex
ОбзорДокументацияВойти
/
niceSOFT
/
flex
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
flex/
tests/
..
.gitignore

Extract correct line numbers to use in line number test

3 года назад
Makefile.am

test\!: UNDO Turn off tests for fake Go backend

6 месяцев назад
README

typos

3 года назад
alloc_extra.txt

Cut down on input-file proliferation.

6 лет назад
alloc_extra_c99.l

Eliminate forwards in the C99 back end.

6 лет назад
alloc_extra_r.l

test: Rename alloc_extra_r.l to match its reentrant behavior

6 месяцев назад
array.rules

Rulesets now carry their test loads with them.

6 лет назад
array.txt

fix(test): Re-add test inputs to tests/

5 лет назад
basic.rules

Rulesets now carry their test loads with them.

6 лет назад
basic.txt

fix(test): Re-add test inputs to tests/

5 лет назад
bison_nr.txt

use underscores in test file names to silence automake warnings

12 лет назад
bison_nr_main.c

warning: redundant redeclaration of '...' [-Wredundant-decls]

10 лет назад
bison_nr_parser.y

warning: redundant redeclaration of '...' [-Wredundant-decls]

10 лет назад
bison_nr_scanner.l

Remove allocation casts

11 лет назад
bison_yylloc.txt

use underscores in test file names to silence automake warnings

12 лет назад
bison_yylloc_main.c

Fix a few "unused parameter" warnings

12 лет назад
bison_yylloc_parser.y

warning: redundant redeclaration of '...' [-Wredundant-decls]

10 лет назад
bison_yylloc_scanner.l

Remove allocation casts

11 лет назад
bison_yylval.txt

use underscores in test file names to silence automake warnings

12 лет назад
bison_yylval_main.c

Fix a few "unused parameter" warnings

12 лет назад
bison_yylval_parser.y

warning: no previous prototype for '...' [-Wmissing-prototypes]

10 лет назад
bison_yylval_scanner.l

Improved M4 quotation

10 лет назад
bol.rules

Fix typo revealed by Go porting work, and improve test coverage to match.

6 лет назад
bol.txt

fix(test): Re-add test inputs to tests/

5 лет назад
c_cxx_nr.lll

Fix M4 quoting of section 3.

10 лет назад
c_cxx_nr.txt

refactor c_cxx_nr, c_cxx_r tests for new test suite layout

12 лет назад
c_cxx_r.lll

Fix M4 quoting of section 3.

10 лет назад
c_cxx_r.txt

refactor c_cxx_nr, c_cxx_r tests for new test suite layout

12 лет назад
ccl.rules

Simplify and generalize the testmaker macros.

6 лет назад
ccl.txt

fix(test): Re-add test inputs to tests/

5 лет назад
cxx_basic.ll

Fix `unused function` warnings in tests

12 лет назад
cxx_basic.txt

refactor cxx_basic test for new test suite layout

12 лет назад
cxx_multiple_scanners.txt

refactor cxx_multiple_scanners test for new test suite layout

12 лет назад
cxx_multiple_scanners_1.ll

refactor cxx_multiple_scanners test for new test suite layout

12 лет назад
cxx_multiple_scanners_2.ll

refactor cxx_multiple_scanners test for new test suite layout

12 лет назад
cxx_multiple_scanners_main.cc

refactor cxx_multiple_scanners test for new test suite layout

12 лет назад
cxx_restart.ll

Fix yyrestart(NULL) SEGV.

10 лет назад
cxx_restart.txt

Fix yyrestart(NULL) SEGV.

10 лет назад
cxx_yywrap.ll

refactor cxx_yywrap test for new test suite layout

12 лет назад
cxx_yywrap.txt

refactor cxx_yywrap test for new test suite layout

12 лет назад
debug.rules

Convert the debug test to be ruleset-based,

6 лет назад
debug.txt

fix(test): Re-add test inputs to tests/

5 лет назад
extended.rules

Simplify and generalize the testmaker macros.

6 лет назад
extended.txt

fix(test): Re-add test inputs to tests/

5 лет назад
fixedtrailing.rules

Rename some rules files to make maintaining .gitignore simpler.

6 лет назад
fixedtrailing.txt

fix(test): Re-add test inputs to tests/

5 лет назад
flexname.rules

typos

3 года назад
flexname.txt

fix(test): Re-add test inputs to tests/

5 лет назад
header_nr.txt

refactor header_nr test for new test suite layout

12 лет назад
header_nr_main.c

Fix a few "unused parameter" warnings

12 лет назад
header_nr_scanner.l

Fix `unused function` warnings in tests

12 лет назад
header_r.txt

refactor header_r test for new test suite layout

12 лет назад
header_r_main.c

Remove a few `unused variable` warnings

12 лет назад
header_r_scanner.l

Fix `unused function` warnings in tests

12 лет назад
include_by_buffer.direct.l

Polish tests and test documentation.

6 лет назад
include_by_buffer.direct.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_buffer.direct_2.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_buffer.direct_3.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_push.direct.l

Polish tests and test documentation.

6 лет назад
include_by_push.direct.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_push.direct_2.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_push.direct_3.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_reentrant.direct.l

Deprecate ECHO in favor of yyecho().

6 лет назад
include_by_reentrant.direct.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_reentrant.direct_2.txt

refactor include_by_* tests for new test suite layout

12 лет назад
include_by_reentrant.direct_3.txt

refactor include_by_* tests for new test suite layout

12 лет назад
lexcompat.rules

Simplify and generalize the testmaker macros.

6 лет назад
lexcompat.txt

fix(test): Re-add test inputs to tests/

5 лет назад
lineno.rules

typos

3 года назад
lineno.txt

fix(test): Re-add test inputs to tests/

5 лет назад
lineno_generated.l.in

Extract correct line numbers to use in line number test

3 года назад
mem.txt

Cut down on input-file proliferation.

6 лет назад
mem_c99.l

Improve information hiding in C99 and Go back ends.

6 лет назад
mem_nr.l

Fix M4 quoting of section 3.

10 лет назад
mem_r.l

Fix M4 quoting of section 3.

10 лет назад
multiple_scanners_nr_1.l

Fix `unused function` warnings in tests

12 лет назад
multiple_scanners_nr_2.l

Fix `unused function` warnings in tests

12 лет назад
multiple_scanners_nr_main.c

Polish tests and test documentation.

6 лет назад
multiple_scanners_r_1.l

Fix `unused function` warnings in tests

12 лет назад
multiple_scanners_r_2.l

Fix `unused function` warnings in tests

12 лет назад
multiple_scanners_r_main.c

Polish tests and test documentation.

6 лет назад
no_bison_stub.c

test: Skip bison tests if bison is not available

10 лет назад
options.cn

test: Remove test scripts bashisms.

10 лет назад
posix.rules

Rulesets now carry their test loads with them.

6 лет назад
posix.txt

fix(test): Re-add posix test input to repo.

5 лет назад
posixlycorrect.rules

Rulesets now carry their test loads with them.

6 лет назад
posixlycorrect.txt

fix(test): Re-add test inputs to tests/

5 лет назад
prefix.txt

Cut down on input-file proliferation.

6 лет назад
prefix_c99.l

fix(build): Comment out impl func dec in prefix_c99 test.

2 года назад
prefix_nr.l

Polish tests and test documentation.

6 лет назад
prefix_r.l

Polish tests and test documentation.

6 лет назад
preposix.rules

Rulesets now carry their test loads with them.

6 лет назад
preposix.txt

fix(test): Re-add test inputs to tests/

5 лет назад
pthread.l

Deprecate BEGIN in favor of yybegin(). Worst of the awkward squad.

6 лет назад
pthread_1.txt

refactor pthread test for new test suite layout

12 лет назад
pthread_2.txt

refactor pthread test for new test suite layout

12 лет назад
pthread_3.txt

refactor pthread test for new test suite layout

12 лет назад
pthread_4.txt

refactor pthread test for new test suite layout

12 лет назад
pthread_5.txt

refactor pthread test for new test suite layout

12 лет назад
quoteincomment.rules

Simplify and generalize the testmaker macros.

6 лет назад
quoteincomment.txt

fix(test): Re-add test inputs to tests/

5 лет назад
quotes.l

test(quotes): Add after action comment tests for m4quotes.

3 года назад
quotes.txt

Cut down on input-file proliferation.

6 лет назад
reject.rules

Simplify and generalize the testmaker macros.

6 лет назад
reject.txt

fix(test): Re-add test inputs to tests/

5 лет назад
rescan_nr.direct.l

Fix M4 quoting of section 3.

10 лет назад
rescan_nr.direct.txt

refactor rescan_r test for new test suite layout

12 лет назад
rescan_r.direct.l

Fix M4 quoting of section 3.

10 лет назад
rescan_r.direct.txt

refactor rescan_r test for new test suite layout

12 лет назад
ruleset.am

test\!: UNDO Turn off tests for fake Go backend

6 месяцев назад
ruleset.sh

typos

3 года назад
state_buf.direct.lll

Don't use C++ auto, it angers TravisCI.

5 лет назад
state_buf.direct.txt

Test for reversion of CVE-2006-0459.

5 лет назад
state_buf_multiple.direct.lll

Ensure size of Reject state buffer is sufficient each time yy_switch_to_buffer is called.

5 лет назад
state_buf_multiple.direct.txt

Ensure size of Reject state buffer is sufficient each time yy_switch_to_buffer is called.

5 лет назад
string_c99.l

Polish tests and test documentation.

6 лет назад
string_nr.l

Polish tests and test documentation.

6 лет назад
string_r.l

Polish tests and test documentation.

6 лет назад
tableopts.rules

Rulesets now carry their test loads with them.

6 лет назад
tableopts.txt

fix(test): Re-add test inputs to tests/

5 лет назад
test-yydecl-gen.sh

chore(test): Clean up debugging in tests

5 лет назад
test-yylmax

Implement and document %option yylmax to replace #define YYLMAX.

6 лет назад
testmaker.m4

Go back end: More Goification of names.

6 лет назад
testmaker.sh

typos

3 года назад
testwrapper-direct.sh

chore(test): Declare script variables before use.

5 лет назад
testwrapper.sh

remove unused DO_COMPARISON

3 года назад
top.l

Finish up the simple-test set for C99.

6 лет назад
top.txt

refactor top test for new test suite layout

12 лет назад
top_main.c

Remove a few `unused variable` warnings

12 лет назад
vartrailing.rules

Rename some rules files to make maintaining .gitignore simpler.

6 лет назад
vartrailing.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yyextra.txt

Cut down on input-file proliferation.

6 лет назад
yyextra_c99.l

Force reentrancy on on the c99 back end...

6 лет назад
yyextra_nr.l

Abolish the cpp test extension. Those things are just tessts.

6 лет назад
yyless.rules

typos

3 года назад
yyless.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yymore.rules

Fix typo revealed by Go porting work, and improve test coverage to match.

6 лет назад
yymore.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yymorearray.rules

Fix typo revealed by Go porting work, and improve test coverage to match.

6 лет назад
yymorearray.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yymorearraybol.rules

Up-gun a test to use the lineno code in the array+BOL case...

6 лет назад
yymorearraybol.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yyunput.rules

Rulesets now carry their test loads with them.

6 лет назад
yyunput.txt

fix(test): Re-add test inputs to tests/

5 лет назад
yywrap_r.i3.l

fix(issue-525): Fail gracefully when yy_get_next_buffer can't find one.

4 года назад
README
This file describes the flex test suite.
 
* WHO SHOULD USE THE TEST SUITE?
 
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 TEST SUITE
 
Each test is centered around a scanner known to work with the most
recent version of flex. In general, after you modify your copy of the
flex distribution, you should re-run the test suite. Some of the tests
may require certain tools to be available (e.g., bison, diff). If any
test returns an error or generates an error message, then your
modifications *may* have broken a feature of flex. At a minimum,
you'll want to investigate the failure and determine if it's truly
significant.
 
* HOW TO RUN THE TEST SUITE
 
To build and execute all tests from the top level of the flex source tree:
 
$ make check
 
To build and execute a single test:
 
$ cd tests/ # from the top level of the flex tree.
$ make testname.log
 
where "testname" is the name of the test. This is an automake-ism
that will create (or re-create, if need be), a log of the particular
test run that you're working on.
 
* HOW TO ADD A NEW TEST TO THE TEST SUITE
 
** If possible, just write a *.rules file. Exit with status 1 to
indicate failure, e.g. with a "." production if nothing
prior properly consumed every input token. The test machinery
will expand a rules file into tests for all back ends. Note that
text following ### at the end of the ruleset will be used as input.
 
** Otherwise, list your test in the TESTS variable in Makefile.am in
this directory. Note that due to the large number of tests, we use
variables to group similar tests together. This also helps with
handling the automake test suite requirements. Hopefully your test
can be listed in SIMPLE_TESTS. You'll need to add the appropriate
automake _SOURCES variable as well, and .gitignore lines for the
binary and generated code. If you're unsure, then consult
the automake manual, paying attention to the parallel test harness
section.
 
** On success, your test should return zero.
 
** On error, your test should return 1 (one) and print a message to
stderr, which will have been redirected to the log file created by the
automake test suite harness.
 
** If your test is skipped (e.g., because bison was not found), then
the test should return 77 (seventy-seven). This is the exit status that
would be recognized by automake's "test-driver" as _skipped_.
 
** Once your work is done, submit a patch via the flex development
mailing list, the github pull request mechanism or some other
suitable means.
 
* NAMING CONVENTIONS
 
A test with an _nr suffix exercises a non-reentrant scanner built
with the default cpp back end.
 
A test with an _r suffix exercises a reentrant scanner built
with the default cpp back end.
 
A test with a c99 suffix exercises the c99 back end. All C99
scanners are re-entrant.
 
Most tests occur in groups with a common stem in the names, like
alloc_extra_ or debug_. These are exercising the same token grammar
under different back ends. As new target languages are added these
groups of parallel tests will grow. Tests that are not part of one of
these series are usually of features supported on the default cpp
back end only.
 
The "generated" tests are made by wrapping boilerplate code around a
rules file. The assumption is that the test binary should consume the
data following ### in the rules file, exercising some set of Flex
features and not returning a nonzero status.
 
If you can express your test as a ruleset within in this protocol,
please do so. Those tests are easy to port to new back ends, as that
whole job can be done by enhancing testmaker.m4.
 
* WHY SOME TESTS ARE MISSING
 
The "top" test is backend-independent; what it's really testing
is Flex's ability to accumulate and ship preamble code sections.
 
The "quotes" test is also backend-independent; it's testing that
m4 expansion doesn't leak through the generated scanner.
 
The C99 backend is missing tests for the Bison bridge, header
generation, and loadable tables because it omits those features in
order to be a simpler starting point for wring new back ends.