@matheusbsbs / matheus-bagliano / commits / c296134d03
Fork 0

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 <gitster@pobox.com>

Junio C Hamano committed Mar 11, 2010 at 21:51 UTC c296134d038fe6d836fe3848e0b342d920933683
1 file changed +3 -3
t/t5516-fetch-push.sh
+3 -3
@@ -672,7 +672,7 @@ test_expect_success 'push --porcelain' '
672 test "z$r" = "z$the_commit" &&
673 test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
674 ) &&
675 - diff -q .git/foo .git/bar
675 + test_cmp .git/foo .git/bar
676 '
677
678 test_expect_success 'push --porcelain bad url' '
@@ -692,7 +692,7 @@ test_expect_success 'push --porcelain rejected' '
692 echo >>.git/foo "! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)" &&
693
694 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
696 '
697
698 test_expect_success 'push --porcelain --dry-run rejected' '
@@ -707,7 +707,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
707 echo >>.git/foo "Done" &&
708
709 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
711 '
712
713 test_done