summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbe4f44)
raw | patch | inline | side by side (parent: fbe4f44)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Mar 2010 05:51:57 +0000 (21:51 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Mar 2010 05:53:07 +0000 (21:53 -0800) |
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>
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>
t/t5516-fetch-push.sh | patch | blob | history |
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 11adb0b0edcc0cbc6d193a411ac40dada7ca739d..2de98e6561607b87bceef66c20ad9055d04878c3 100755 (executable)
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
test "z$r" = "z$the_commit" &&
test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
) &&
- diff -q .git/foo .git/bar
+ test_cmp .git/foo .git/bar
'
test_expect_success 'push --porcelain bad url' '
echo >>.git/foo "! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)" &&
test_must_fail git push >.git/bar --porcelain testrepo refs/heads/master:refs/heads/master &&
- diff -q .git/foo .git/bar
+ test_cmp .git/foo .git/bar
'
test_expect_success 'push --porcelain --dry-run rejected' '
echo >>.git/foo "Done" &&
test_must_fail git push >.git/bar --porcelain --dry-run testrepo refs/heads/master^:refs/heads/master &&
- diff -q .git/foo .git/bar
+ test_cmp .git/foo .git/bar
'
test_done