diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2012-09-14 11:46:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-15 23:35:40 -0700 |
commit | dfe3642515d3d2679bdc25c2be4d961201e9f095 (patch) | |
tree | cbf5509491ffe3c7e3347da15ef3a6095397db29 | |
parent | b327bf74bd631790918d6730404eb97baec267c9 (diff) | |
download | git-dfe3642515d3d2679bdc25c2be4d961201e9f095.tar.gz git-dfe3642515d3d2679bdc25c2be4d961201e9f095.tar.xz |
t7810-grep: test multiple --grep with and without --all-match
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7810-grep.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 180e99869..b84190931 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -479,6 +479,22 @@ test_expect_success 'log grep (6)' ' test_cmp expect actual ' +test_expect_success 'log with multiple --grep uses union' ' + git log --grep=i --grep=r --format=%s >actual && + { + echo fourth && echo third && echo initial + } >expect && + test_cmp expect actual +' + +test_expect_success 'log --all-match with multiple --grep uses intersection' ' + git log --all-match --grep=i --grep=r --format=%s >actual && + { + echo third + } >expect && + test_cmp expect actual +' + test_expect_success 'log --grep --author implicitly uses all-match' ' # grep matches initial and second but not third # author matches only initial and third |