t7810-grep: bring log --grep tests in common form
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber committed
Sep 14, 2012 at 11:46 UTC
b327bf74bd631790918d6730404eb97baec267c9
1 file changed
+18
-6
t/t7810-grep.sh
+18
-6
@@ -435,31 +435,41 @@ test_expect_success 'log grep setup' '
435
436
test_expect_success 'log grep (1)' '
437
git log --author=author --pretty=tformat:%s >actual &&
438
- ( echo third ; echo initial ) >expect &&
438
+ {
439
+ echo third && echo initial
440
+ } >expect &&
441
test_cmp expect actual
442
'
443
444
test_expect_success 'log grep (2)' '
445
git log --author=" * " -F --pretty=tformat:%s >actual &&
444
- ( echo second ) >expect &&
446
+ {
447
+ echo second
448
+ } >expect &&
449
test_cmp expect actual
450
'
451
452
test_expect_success 'log grep (3)' '
453
git log --author="^A U" --pretty=tformat:%s >actual &&
450
- ( echo third ; echo initial ) >expect &&
454
+ {
455
+ echo third && echo initial
456
+ } >expect &&
457
test_cmp expect actual
458
'
459
460
test_expect_success 'log grep (4)' '
461
git log --author="frotz\.com>$" --pretty=tformat:%s >actual &&
456
- ( echo second ) >expect &&
462
+ {
463
+ echo second
464
+ } >expect &&
465
test_cmp expect actual
466
'
467
468
test_expect_success 'log grep (5)' '
469
git log --author=Thor -F --pretty=tformat:%s >actual &&
462
- ( echo third ; echo initial ) >expect &&
470
+ {
471
+ echo third && echo initial
472
+ } >expect &&
473
test_cmp expect actual
474
'
475
@@ -473,7 +483,9 @@ test_expect_success 'log --grep --author implicitly uses all-match' '
483
# grep matches initial and second but not third
484
# author matches only initial and third
485
git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
476
- echo initial >expect &&
486
+ {
487
+ echo initial
488
+ } >expect &&
489
test_cmp expect actual
490
'
491