busybox/findutils
James Hogan 5fc0585c01 grep: fix grep -x to not set REG_NOSUB
When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses
regexec's regmatch_t output to determine if the match was the entire
line. However it also set the REG_NOSUB flag which makes it ignore the
regmatch_t argument.

Add an exception to the setting of REG_NOSUB for OPT_x and add some test
cases to test the behaviour of -x.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Natanael Copa <ncopa@alpinelinux.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-16 14:47:05 +02:00
..
Config.src make it possible to keep Config/Kbuild snippets in *.c files 2010-05-09 04:22:48 +02:00
find.c find: support -HLP 2013-05-14 17:20:35 +02:00
grep.c grep: fix grep -x to not set REG_NOSUB 2013-05-16 14:47:05 +02:00
Kbuild.src *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
xargs.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00