diff options
Diffstat (limited to 't/t7810-grep.sh')
-rwxr-xr-x | t/t7810-grep.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 4523ca926b..f4c225b410 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -787,6 +787,24 @@ do " done +test_expect_success !PTHREADS,!GETTEXT_POISON 'grep --threads=N or pack.threads=N warns when no pthreads' ' + git grep --threads=2 Hello hello_world 2>err && + grep ^warning: err >warnings && + test_line_count = 1 warnings && + grep "no threads support, ignoring --threads" err && + git -c grep.threads=2 grep Hello hello_world 2>err && + grep ^warning: err >warnings && + test_line_count = 1 warnings && + grep "no threads support, ignoring grep\.threads" err && + git -c grep.threads=2 grep --threads=4 Hello hello_world 2>err && + grep ^warning: err >warnings && + test_line_count = 2 warnings && + grep "no threads support, ignoring --threads" err && + grep "no threads support, ignoring grep\.threads" err && + git -c grep.threads=0 grep --threads=0 Hello hello_world 2>err && + test_line_count = 0 err +' + test_expect_success 'grep from a subdirectory to search wider area (1)' ' mkdir -p s && ( |