Home | History | Annotate | only in /src/tests/lib/libc/regex
Up to higher level directory
NameDateSize
data/09-Nov-2022
debug.c25-Feb-20215K
main.c23-Feb-202112.3K
Makefile02-Jan-20251.4K
README08-Jan-20111.4K
split.c08-Jan-20118.1K
t_exhaust.c09-Jun-20215.8K
t_regex.sh24-Aug-20122.8K
t_regex_att.c23-Feb-202117.6K
t_regex_binary.c01-Jan-20252.5K
test_regex.h08-Jan-20111.9K

README

      1 regular expression test set
      2 Lines are at least three fields, separated by one or more tabs.  "" stands
      3 for an empty field.  First field is an RE.  Second field is flags.  If
      4 C flag given, regcomp() is expected to fail, and the third field is the
      5 error name (minus the leading REG_).
      6 
      7 Otherwise it is expected to succeed, and the third field is the string to
      8 try matching it against.  If there is no fourth field, the match is
      9 expected to fail.  If there is a fourth field, it is the substring that
     10 the RE is expected to match.  If there is a fifth field, it is a comma-
     11 separated list of what the subexpressions should match, with - indicating
     12 no match for that one.  In both the fourth and fifth fields, a (sub)field
     13 starting with @ indicates that the (sub)expression is expected to match
     14 a null string followed by the stuff after the @; this provides a way to
     15 test where null strings match.  The character `N' in REs and strings
     16 is newline, `S' is space, `T' is tab, `Z' is NUL.
     17 
     18 The full list of flags:
     19   -	placeholder, does nothing
     20   b	RE is a BRE, not an ERE
     21   &	try it as both an ERE and a BRE
     22   C	regcomp() error expected, third field is error name
     23   i	REG_ICASE
     24   m	("mundane") REG_NOSPEC
     25   s	REG_NOSUB (not really testable)
     26   n	REG_NEWLINE
     27   ^	REG_NOTBOL
     28   $	REG_NOTEOL
     29   #	REG_STARTEND (see below)
     30   p	REG_PEND
     31 
     32 For REG_STARTEND, the start/end offsets are those of the substring
     33 enclosed in ().
     34