1#!/bin/sh 2 3test_description="Comparison of git-grep's regex engines with -F 4 5Set GIT_PERF_7821_GREP_OPTS in the environment to pass options to 6git-grep. Make sure to include a leading space, 7e.g. GIT_PERF_7821_GREP_OPTS=' -w'. See p7820-grep-engines.sh for more 8options to try. 9" 10 11. ./perf-lib.sh 12 13test_perf_large_repo 14test_checkout_worktree 15 16for pattern in'int''uncommon''æ' 17do 18for engine in fixed basic extended perl 19do 20iftest$engine="perl"&& ! test_have_prereq PCRE 21then 22 prereq="PCRE" 23else 24 prereq="" 25fi 26 test_perf $prereq"$enginegrep$GIT_PERF_7821_GREP_OPTS$pattern"" 27 git -c grep.patternType=$enginegrep$GIT_PERF_7821_GREP_OPTS$pattern>'out.$engine' || : 28 " 29done 30 31 test_expect_success "assert that all engines found the same for$GIT_PERF_7821_GREP_OPTS$pattern"' 32 test_cmp out.fixed out.basic && 33 test_cmp out.fixed out.extended && 34 if test_have_prereq PCRE 35 then 36 test_cmp out.fixed out.perl 37 fi 38 ' 39done 40 41test_done