diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-05-20 21:42:17 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-21 08:25:38 +0900 |
commit | 966be95549374916fc2736897b99c4918899b8ca (patch) | |
tree | b1b209d93dcfb7ad926a65ffb0b805fb1511f0ec /t/perf/README | |
parent | grep: prepare for testing binary regexes containing rx metacharacters (diff) | |
download | tgif-966be95549374916fc2736897b99c4918899b8ca.tar.xz |
grep: add tests to fix blind spots with \0 patterns
Address a big blind spot in the tests for patterns containing \0. The
is_fixed() function considers any string that contains \0 fixed, even
if it contains regular expression metacharacters, those patterns are
currently matched with kwset.
Before this change removing that memchr(s, 0, len) check from
is_fixed() wouldn't change the result of any of the tests, since
regcomp() will happily match the part before the \0.
The kwset path is dependent on whether the the -i flag is on, and
whether the pattern has any non-ASCII characters, but none of this was
tested for.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/README')
0 files changed, 0 insertions, 0 deletions