@@ -281,8 +281,9 @@ test_expect_success 'stop on conflicting pick' '
281
281
test_cmp expect2 file1 &&
282
282
test "$(git diff --name-status |
283
283
sed -n -e "/^U/s/^U[^a-z]*//p")" = file1 &&
284
- test 4 = $(grep -v "^#" < .git/rebase-merge/done | wc -l) &&
285
- test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)
284
+ grep -v "^#" <.git/rebase-merge/done >actual &&
285
+ test_line_count = 4 actual &&
286
+ test 0 = $(grep -c "^[^#]" <.git/rebase-merge/git-rebase-todo)
286
287
'
287
288
288
289
test_expect_success ' show conflicted patch' '
@@ -401,8 +402,8 @@ test_expect_success 'multi-squash only fires up editor once' '
401
402
) &&
402
403
test $base = $(git rev-parse HEAD^) &&
403
404
git show >output &&
404
- count=$( grep ONCE output | wc -l) &&
405
- test 1 = $count
405
+ grep ONCE output >actual &&
406
+ test_line_count = 1 actual
406
407
'
407
408
408
409
test_expect_success ' multi-fixup does not fire up editor' '
@@ -416,8 +417,7 @@ test_expect_success 'multi-fixup does not fire up editor' '
416
417
) &&
417
418
test $base = $(git rev-parse HEAD^) &&
418
419
git show >output &&
419
- count=$(grep NEVER output | wc -l) &&
420
- test 0 = $count &&
420
+ ! grep NEVER output &&
421
421
git checkout @{-1} &&
422
422
git branch -D multi-fixup
423
423
'
@@ -436,8 +436,8 @@ test_expect_success 'commit message used after conflict' '
436
436
) &&
437
437
test $base = $(git rev-parse HEAD^) &&
438
438
git show >output &&
439
- count=$( grep ONCE output | wc -l) &&
440
- test 1 = $count &&
439
+ grep ONCE output >actual &&
440
+ test_line_count = 1 actual &&
441
441
git checkout @{-1} &&
442
442
git branch -D conflict-fixup
443
443
'
@@ -456,8 +456,8 @@ test_expect_success 'commit message retained after conflict' '
456
456
) &&
457
457
test $base = $(git rev-parse HEAD^) &&
458
458
git show >output &&
459
- count=$( grep TWICE output | wc -l) &&
460
- test 2 = $count &&
459
+ grep TWICE output >actual &&
460
+ test_line_count = 2 actual &&
461
461
git checkout @{-1} &&
462
462
git branch -D conflict-squash
463
463
'
@@ -501,8 +501,8 @@ test_expect_success 'squash ignores comments' '
501
501
) &&
502
502
test $base = $(git rev-parse HEAD^) &&
503
503
git show >output &&
504
- count=$( grep ONCE output | wc -l) &&
505
- test 1 = $count &&
504
+ grep ONCE output >actual &&
505
+ test_line_count = 1 actual &&
506
506
git checkout @{-1} &&
507
507
git branch -D skip-comments
508
508
'
@@ -519,8 +519,8 @@ test_expect_success 'squash ignores blank lines' '
519
519
) &&
520
520
test $base = $(git rev-parse HEAD^) &&
521
521
git show >output &&
522
- count=$( grep ONCE output | wc -l) &&
523
- test 1 = $count &&
522
+ grep ONCE output >actual &&
523
+ test_line_count = 1 actual &&
524
524
git checkout @{-1} &&
525
525
git branch -D skip-blank-lines
526
526
'
0 commit comments