[PATCHv2 1/6] t7810-grep: bring log --grep tests in common form
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Sep 13, 2012, 14:04 UTC
- Message-ID
- <cbc677f1acfc4d2f29d69e7f6d4b1b780f6e40dd.1347544259.git.git@drmicha.warpmail.net>
- In-Reply-To
- <7v7grzdue6.fsf@alter.siamese.dyndns.org>
The log --grep tests generate the expected out in different ways. Make them all use command blocks so that subshells are avoided and the expected output is easier to grasp visually.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> --- t/t7810-grep.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 35d357d..9b683ac 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -502,31 +502,41 @@ test_expect_success 'log grep setup' ' test_expect_success 'log grep (1)' ' git log --author=author --pretty=tformat:%s >actual && - ( echo third ; echo initial ) >expect && + { + echo third && echo initial + } >expect && test_cmp expect actual ' test_expect_success 'log grep (2)' ' git log --author=" * " -F --pretty=tformat:%s >actual && - ( echo second ) >expect && + { + echo second + } >expect && test_cmp expect actual ' test_expect_success 'log grep (3)' ' git log --author="^A U" --pretty=tformat:%s >actual && - ( echo third ; echo initial ) >expect && + { + echo third && echo initial + } >expect && test_cmp expect actual ' test_expect_success 'log grep (4)' ' git log --author="frotz\.com>$" --pretty=tformat:%s >actual && - ( echo second ) >expect && + { + echo second + } >expect && test_cmp expect actual ' test_expect_success 'log grep (5)' ' git log --author=Thor -F --pretty=tformat:%s >actual && - ( echo third ; echo initial ) >expect && + { + echo third && echo initial + } >expect && test_cmp expect actual ' @@ -540,7 +550,9 @@ 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 && + { + echo initial + } >expect && test_cmp expect actual '
-- 1.7.12.463.gbd9d638