Name | Date | Size | |
---|---|---|---|
.. | 2016-01-11 21:54:23 | 42 | |
austin.dat | 2016-01-11 21:54:23 | 1.4 KiB | |
basic.dat | 2016-01-11 21:54:23 | 8.4 KiB | |
callout.dat | 2016-01-11 21:54:23 | 659 | |
categorize.dat | 2016-01-11 21:54:23 | 2.3 KiB | |
cut.dat | 2016-01-11 21:54:23 | 959 | |
ed.c | 2016-01-11 21:54:23 | 35.2 KiB | |
ed.tst | 2016-01-11 21:54:23 | 4.1 KiB | |
escape.dat | 2016-01-11 21:54:23 | 1.4 KiB | |
forcedassoc.dat | 2016-01-11 21:54:23 | 1.3 KiB | |
grep.c | 2016-01-11 21:54:23 | 22.8 KiB | |
grep.tst | 2016-01-11 21:54:23 | 114.2 KiB | |
group.dat | 2016-01-11 21:54:23 | 1.1 KiB | |
haskell.dat | 2016-01-11 21:54:23 | 4 KiB | |
iso8859-1.dat | 2016-01-11 21:54:23 | 4.3 KiB | |
leftassoc.dat | 2016-01-11 21:54:23 | 615 | |
libtre.dat | 2016-01-11 21:54:23 | 8.9 KiB | |
locale.dat | 2016-01-11 21:54:23 | 5.1 KiB | |
Makefile | 2016-01-11 21:54:23 | 2 KiB | |
Makefile.re | 2016-01-11 21:54:23 | 693 | |
Mamfile | 2016-01-11 21:54:23 | 17.7 KiB | |
minimal.dat | 2016-01-11 21:54:23 | 4.1 KiB | |
nested.dat | 2016-01-11 21:54:23 | 10.6 KiB | |
noop.dat | 2016-01-11 21:54:23 | 28.6 KiB | |
nullsubexpr-A.dat | 2016-01-11 21:54:23 | 1.8 KiB | |
nullsubexpr.dat | 2016-01-11 21:54:23 | 1.8 KiB | |
pcre-1.dat | 2016-01-11 21:54:23 | 63.6 KiB | |
pcre-2.dat | 2016-01-11 21:54:23 | 10.4 KiB | |
pcre-3.dat | 2016-01-11 21:54:23 | 26.4 KiB | |
pcre-4.dat | 2016-01-11 21:54:23 | 858 | |
pcre-5.dat | 2016-01-11 21:54:23 | 2.6 KiB | |
perl.dat | 2016-01-11 21:54:23 | 7.5 KiB | |
re-assoc.mm | 2016-01-11 21:54:23 | 329 | |
re-categorize.mm | 2016-01-11 21:54:23 | 3 KiB | |
re-definitions.mm | 2016-01-11 21:54:23 | 12.9 KiB | |
re-interpretation.mm | 2016-01-11 21:54:23 | 32.1 KiB | |
re-nullsubexpr.mm | 2016-01-11 21:54:23 | 297 | |
re-repetition.mm | 2016-01-11 21:54:23 | 276 | |
README | 2016-01-11 21:54:23 | 581 | |
README.re | 2016-01-11 21:54:23 | 2 KiB | |
reg.dat | 2016-01-11 21:54:23 | 14.2 KiB | |
regex++.dat | 2016-01-11 21:54:23 | 23.4 KiB | |
RELEASE | 2016-01-11 21:54:23 | 8.8 KiB | |
repetition.dat | 2016-01-11 21:54:23 | 5.3 KiB | |
rightassoc.dat | 2016-01-11 21:54:23 | 615 | |
rxposix.dat | 2016-01-11 21:54:23 | 19.1 KiB | |
sed.h | 2016-01-11 21:54:23 | 4.1 KiB | |
sed.tst | 2016-01-11 21:54:23 | 13.9 KiB | |
sed0.c | 2016-01-11 21:54:23 | 8.1 KiB | |
sed1.c | 2016-01-11 21:54:23 | 15.4 KiB | |
sed2.c | 2016-01-11 21:54:23 | 11.5 KiB | |
sed3.c | 2016-01-11 21:54:23 | 3.4 KiB | |
subexpr.dat | 2016-01-11 21:54:23 | 787 | |
testdecomp.dat | 2016-01-11 21:54:23 | 428 | |
testfmt.c | 2016-01-11 21:54:23 | 11.6 KiB | |
testfmt.dat | 2016-01-11 21:54:23 | 967 | |
testfnmatch.c | 2016-01-11 21:54:23 | 18.4 KiB | |
testfnmatch.dat | 2016-01-11 21:54:23 | 13 KiB | |
testglob.c | 2016-01-11 21:54:23 | 22.2 KiB | |
testglob.dat | 2016-01-11 21:54:23 | 11.2 KiB | |
testmatch.c | 2016-01-11 21:54:23 | 23.5 KiB | |
testmatch.dat | 2016-01-11 21:54:23 | 10.1 KiB | |
testoldmatch.c | 2016-01-11 21:54:23 | 1.5 KiB | |
testregex.c | 2016-01-11 21:54:23 | 51.4 KiB | |
testregex.dat | 2016-01-11 21:54:23 | 47 KiB | |
testregex.mm | 2016-01-11 21:54:23 | 4.6 KiB | |
testsub.dat | 2016-01-11 21:54:23 | 6 KiB | |
type.dat | 2016-01-11 21:54:23 | 1.3 KiB | |
unknownassoc.dat | 2016-01-11 21:54:23 | 595 | |
xopen.dat | 2016-01-11 21:54:23 | 472 | |
zero.dat | 2016-01-11 21:54:23 | 6.4 KiB |
README
POSIX regex snarfed from Doug McIlroy's C++. Converted to C by Glenn
Fowler. *'d features have been added to Doug's original code. testre
should compile with other regex implementations, but you may need to
run with -c to catch non-terminating loops and memory faults.
FEATURE BRE ERE ARE
------- --- --- ---
negation NO expr \! expr !
conjunction NO expr \& expr expr & expr
NULL subgroups YES NO YES
word boundaries* \< expr \> \< expr \> < expr >
minimal match* NO REG_MINIMAL REG_MINIMAL
shell patterns* REG_SHELL NO NO
ksh patterns* NO NO REG_SHELL
README.re
This directory contains AT&T test harnesses and data for the X/Open pattern
matching routines:
HARNESS HEADER FUNCTIONS
------- ------ ---------
testfnmatch.c <fnmatch.h> fnmatch()
testglob.c <glob.h> glob()
testregex.c <regex.h> regcomp(),regexec()
Each test*.c file is a main program driven by the *.dat test data files.
testglob.dat is only for testglob; all other test data files work with
the remaining harnesses.
The Makefile has targets for building harnesses and running tests:
all build all harnesses
test run all tests for all harnesses
test.foo build harness foo and run the foo tests
To run a single test, e.g. the standards.dat tests for testregex,
testregex < standards.dat
If the local implementation hangs or dumps on some tests then run with
the -c option.
The -h option lists the test data format details. The test data files
exercise all features; the harnesses detect and ignore features not
supported by the local implementation.
Extensions to the standard terminology are derived from the AT&T RE
implementation, unified under <regex.h> with these modes:
MODE FLAGS
---- -----
BRE 0 basic RE
ERE REG_EXTENDED egrep RE with perl (...) extensions
ARE REG_AUGMENTED ERE with ! negation, <> word boundaries
SRE REG_SHELL sh patterns
KRE REG_SHELL|REG_AUGMENTED ksh93 patterns: ! @ ( | & ) { }
and some additional flags to handle fnmatch():
REG_SHELL_ESCAPED FNM_NOESCAPE
REG_SHELL_PATH FNM_PATHNAME
REG_SHELL_DOT FNM_PERIOD
The original testregex.c was done by Doug McIlroy at Bell Labs.
The current implementation is maintained by
Glenn Fowler <gsf@research.att.com>
I'd like to make the regression tests as comprehensive as possible.
Send any new tests to me and I'll roll them into the open source
distribution at http://www.research.att.com/sw/download/ with proper
attribution.
Please note that some regression tests nail down unspecified standard behavior.
These should be noted in the test data with 'u' but currently are not.
Experience with other implementations will help clean this up.