kevans 39d016e70f 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
..
2017-07-24 04:38:05 +00:00
2017-05-31 19:37:23 +00:00
2017-08-07 14:09:57 +00:00
2017-05-05 14:33:39 +00:00
2017-07-28 23:56:07 +00:00
2017-07-03 19:49:25 +00:00
2017-02-19 17:37:16 +00:00
2017-08-03 15:47:42 +00:00
2017-08-07 14:09:57 +00:00
2017-07-31 19:34:38 +00:00
2017-02-06 08:49:57 +00:00
2017-03-23 22:06:06 +00:00
2017-03-16 21:32:05 +00:00
2017-05-23 09:29:05 +00:00
2017-05-05 13:31:25 +00:00
2017-01-30 16:32:53 +00:00
2017-06-28 09:22:45 +00:00
2017-02-28 23:42:47 +00:00
2017-03-25 14:14:11 +00:00
2017-06-01 19:21:30 +00:00
2017-02-28 23:42:47 +00:00
2017-03-27 21:00:49 +00:00
2017-06-03 18:21:50 +00:00
2017-08-07 14:09:57 +00:00