Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t7810-grep: test multiple --grep with and without --all-match
author
Michael J Gruber
<git@drmicha.warpmail.net>
Fri, 14 Sep 2012 09:46:40 +0000
(11:46 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 16 Sep 2012 06:35:40 +0000
(23:35 -0700)
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7810-grep.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b327bf7
)
diff --git
a/t/t7810-grep.sh
b/t/t7810-grep.sh
index 180e9986977b40209647422ffbf3c1d80ecbc68c..b841909315e5604ac51558c07cb5f71155401463 100755
(executable)
--- 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_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
test_expect_success 'log --grep --author implicitly uses all-match' '
# grep matches initial and second but not third
# author matches only initial and third