3 test_description
="Comparison of git-grep's regex engines
5 Set GIT_PERF_7820_GREP_OPTS in the environment to pass options to
6 git-grep. Make sure to include a leading space,
7 e.g. GIT_PERF_7820_GREP_OPTS=' -i'. Some options to try:
20 test_checkout_worktree
26 '\(e.t[^ ]*\|v.ry\) rare' \
27 'm\(ú\|u\)lt.b\(æ\|y\)te'
29 for engine
in basic extended perl
31 if test $engine != "basic"
33 # Poor man's basic -> extended converter.
34 pattern
=$
(echo "$pattern" |
sed 's/\\//g')
36 if test $engine = "perl" && ! test_have_prereq PCRE
42 test_perf
$prereq "$engine grep$GIT_PERF_7820_GREP_OPTS '$pattern'" "
43 git -c grep.patternType=$engine grep$GIT_PERF_7820_GREP_OPTS -- '$pattern' >'out.$engine' || :
47 test_expect_success
"assert that all engines found the same for$GIT_PERF_7820_GREP_OPTS '$pattern'" '
48 test_cmp out.basic out.extended &&
49 if test_have_prereq PCRE
51 test_cmp out.basic out.perl