Skip to content

Commit c296134

Browse files
committed
t5516: Use test_cmp when appropriate
Consistently using test_cmp would make debugging test scripts far easier, as output from them run under "-v" option becomes readable. Besides, some platforms' "diff" implementations lack "-q" option. Signed-off-by: Junio C Hamano <[email protected]>
1 parent fbe4f44 commit c296134

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t5516-fetch-push.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ test_expect_success 'push --porcelain' '
672672
test "z$r" = "z$the_commit" &&
673673
test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
674674
) &&
675-
diff -q .git/foo .git/bar
675+
test_cmp .git/foo .git/bar
676676
'
677677

678678
test_expect_success 'push --porcelain bad url' '
@@ -692,7 +692,7 @@ test_expect_success 'push --porcelain rejected' '
692692
echo >>.git/foo "! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)" &&
693693
694694
test_must_fail git push >.git/bar --porcelain testrepo refs/heads/master:refs/heads/master &&
695-
diff -q .git/foo .git/bar
695+
test_cmp .git/foo .git/bar
696696
'
697697

698698
test_expect_success 'push --porcelain --dry-run rejected' '
@@ -707,7 +707,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
707707
echo >>.git/foo "Done" &&
708708
709709
test_must_fail git push >.git/bar --porcelain --dry-run testrepo refs/heads/master^:refs/heads/master &&
710-
diff -q .git/foo .git/bar
710+
test_cmp .git/foo .git/bar
711711
'
712712

713713
test_done

0 commit comments

Comments
 (0)