From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCHv3 10/11] t7810-grep: test interaction of multiple --grep and --author options
Date: Fri, 14 Sep 2012 11:46:42 +0200 [thread overview]
Message-ID: <e55a91f36d1accfb94fac34aba9ca1eade7b6777.1347615361.git.git@drmicha.warpmail.net> (raw)
In-Reply-To: <7vfw6l9x7i.fsf@alter.siamese.dyndns.org>
In-Reply-To: <cover.1347615361.git.git@drmicha.warpmail.net>
There are tests for this interaction already. Restructure slightly and
avoid any claims about --all-match.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
t/t7810-grep.sh | 38 ++++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index be81d96..f6edb4d 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -495,16 +495,6 @@ test_expect_success 'log --all-match with multiple --grep uses intersection' '
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
- git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
- {
- echo initial
- } >expect &&
- test_cmp expect actual
-'
-
test_expect_success 'log with multiple --author uses union' '
git log --author="Thor" --author="Aster" --format=%s >actual &&
{
@@ -521,17 +511,33 @@ test_expect_success 'log --all-match with multiple --author still uses union' '
test_cmp expect actual
'
-test_expect_success 'log with --grep and multiple --author uses all-match' '
- git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
+test_expect_success 'log --grep --author uses intersection' '
+ # grep matches only third and fourth
+ # author matches only initial and third
+ git log --author="A U Thor" --grep=r --format=%s >actual &&
{
- echo third && echo initial
+ echo third
} >expect &&
test_cmp expect actual
'
-test_expect_success 'log with --grep and multiple --author uses all-match' '
- git log --author="Thor" --author="Night" --grep=q --format=%s >actual &&
- >expect &&
+test_expect_success 'log --grep --grep --author takes union of greps and intersects with author' '
+ # grep matches initial and second but not third
+ # author matches only initial and third
+ git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
+ {
+ echo initial
+ } >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log --grep --author --author takes union of authors and intersects with grep' '
+ # grep matches only initial and third
+ # author matches all but second
+ git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
+ {
+ echo third && echo initial
+ } >expect &&
test_cmp expect actual
'
--
1.7.12.592.g41e7905
next prev parent reply other threads:[~2012-09-14 9:47 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 14:45 [PATCH] rev-list/log: document logic with several limiting options Michael J Gruber
2012-09-11 16:22 ` Junio C Hamano
2012-09-12 13:43 ` Michael J Gruber
2012-09-12 17:25 ` Junio C Hamano
2012-09-12 17:26 ` Junio C Hamano
2012-09-13 14:04 ` [PATCHv2 0/6] " Michael J Gruber
2012-09-13 14:04 ` [PATCHv2 1/6] t7810-grep: bring log --grep tests in common form Michael J Gruber
2012-09-13 14:04 ` [PATCHv2 2/6] t7810-grep: test multiple --grep with and without --all-match Michael J Gruber
2012-09-13 14:04 ` [PATCHv2 3/6] t7810-grep: test multiple --author with --all-match Michael J Gruber
2012-09-13 20:47 ` Junio C Hamano
2012-09-13 23:26 ` Junio C Hamano
2012-09-14 8:14 ` Michael J Gruber
2012-09-14 15:55 ` Junio C Hamano
2012-09-13 14:04 ` [PATCHv2 4/6] t7810-grep: test interaction of multiple --grep and --author options Michael J Gruber
2012-09-13 14:04 ` [PATCHv2 5/6] t7810-grep: test --all-match with " Michael J Gruber
2012-09-13 14:04 ` [PATCHv2 6/6] rev-list/log: document logic with several limiting options Michael J Gruber
2012-09-13 22:29 ` Junio C Hamano
2012-09-14 1:19 ` Junio C Hamano
2012-09-14 2:04 ` Junio C Hamano
2012-09-14 9:46 ` [PATCHv3 00/11] " Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 01/11] grep: teach --debug option to dump the parse tree Michael J Gruber
2012-09-14 17:09 ` Junio C Hamano
2012-09-14 9:46 ` [PATCHv3 02/11] log: name --debug-grep option like in the commit message Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 03/11] grep: show --debug output only once Michael J Gruber
2012-09-14 17:11 ` Junio C Hamano
2012-09-14 9:46 ` [PATCHv3 04/11] log --grep/--author: honor --all-match honored for multiple --grep patterns Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 05/11] log: document use of multiple commit limiting options Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 06/11] fixup! " Michael J Gruber
2012-09-14 17:23 ` Junio C Hamano
2012-09-14 9:46 ` [PATCHv3 07/11] t7810-grep: bring log --grep tests in common form Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 08/11] t7810-grep: test multiple --grep with and without --all-match Michael J Gruber
2012-09-14 9:46 ` [PATCHv3 09/11] t7810-grep: test multiple --author with --all-match Michael J Gruber
2012-09-14 17:58 ` Junio C Hamano
2012-09-14 9:46 ` Michael J Gruber [this message]
2012-09-14 9:46 ` [PATCHv3 11/11] t7810-grep: test --all-match with multiple --grep and --author options Michael J Gruber
2012-09-14 18:01 ` Junio C Hamano
2012-09-14 17:25 ` [PATCHv3 00/11] rev-list/log: document logic with several limiting options Junio C Hamano
2012-09-13 20:18 ` [PATCHv2 0/6] " Junio C Hamano
2012-09-13 7:28 ` [PATCH] " Michael J Gruber
2012-09-13 21:21 ` Junio C Hamano
2012-09-14 7:46 ` Michael J Gruber
2012-09-14 7:50 ` Junio C Hamano
2012-09-14 8:21 ` Michael J Gruber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e55a91f36d1accfb94fac34aba9ca1eade7b6777.1347615361.git.git@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).