regex-tests, regex: allow glibc re_search behavior
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Apr 2013 05:47:31 +0000 (05:47 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Apr 2013 06:28:49 +0000 (06:28 +0000)
commit92f3a4c8e52e64c233e260431d095dbf88554c14
tree0f4a9b402b272468dff4f751b2ab8a06c32e3ea1
parent076ac82d1d7f4df54630f1b4917b3c14f227f032
regex-tests, regex: allow glibc re_search behavior

The data passed to re_search by the test for glibc bug 15078 is a
multi-character collating element followed by a single character.
According to POSIX, "It is unspecified whether a non-matching list
expression matches a multi-character collating element that is not
matched by any of the expressions."

One of differences between glibc and gnulib implementations of
re_search is that glibc re_search matches multi-character
collating elements in that case while gnulib re_search doesn't.

Since both re_search implementations conform to standard, change
the test to allow glibc re_search behavior.

* tests/test-regex.c (main): In test for glibc bug 15078, reformat
re_search input data to make the multi-character collating element
in it clearly visible, and treat re_search return code 0 as valid.
* m4/regex.m4 (gl_REGEX): Likewise.
ChangeLog
m4/regex.m4
tests/test-regex.c