freebsd-dev/lib/libc/regex
Kyle Evans a4a801688c regex(3): Handle invalid {} constructs consistently and adjust tests
Currently, regex(3) exhibits the following wrong behavior as demonstrated
with sed:

 - echo "a{1,2,3}b" | sed -r "s/{/_/"     (1)
 - echo "a{1,2,3}b" | sed "s/\}/_/"       (2)
 - echo "a{1,2,3}b" | sed -r "s/{}/_/"    (3)

Cases (1) and (3) should throw errors but they actually succeed, and (2)
throws an error when it should match the literal '}'. The correct behavior
was decided by comparing to the behavior with the equivalent BRE (1)(3) or
ERE (2) and consulting POSIX, along with some reasonable evaluation.

Tests were also adjusted/added accordingly.

PR:		166861
Reviewed by:	emaste, ngie, pfg
Approved by:	emaste (mentor)
MFC after:	never
Differential Revision:	https://reviews.freebsd.org/D10315
2017-08-08 04:10:46 +00:00
..
grot Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
cname.h regex: unsign and constify some variables. 2017-04-23 21:51:29 +00:00
COPYRIGHT
engine.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
Makefile.inc Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
re_format.7 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
regcomp.c regex(3): Handle invalid {} constructs consistently and adjust tests 2017-08-08 04:10:46 +00:00
regerror.c regex: unsign and constify some variables. 2017-04-23 21:51:29 +00:00
regex2.h The impending libregex will implement GNU extensions to bring BREs and 2017-07-06 17:01:51 +00:00
regex.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
regexec.c regex: unsign and constify some variables. 2017-04-23 21:51:29 +00:00
regfree.c regex: unsign and constify some variables. 2017-04-23 21:51:29 +00:00
Symbol.map
utils.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
WHATSNEW