summaryrefslogtreecommitdiff
path: root/t/t5505-remote.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-23 22:28:56 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-24 00:01:56 -0700
commit3af828634fa5bdbca1b2061a81df8b3fa73b0d34 (patch)
treef4d4a50e8c1686b3ecd796a09f98cc6ca13bc907 /t/t5505-remote.sh
parent998b912927281a871e8d379e2b3a4385c775c4fe (diff)
downloadgit-3af828634fa5bdbca1b2061a81df8b3fa73b0d34.tar.gz
tests: do not use implicit "git diff --no-index"
As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-xt/t5505-remote.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 48ff2d424d..a37b6f5213 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -135,7 +135,7 @@ test_expect_success 'show' '
git config --add remote.origin.push \
+refs/tags/lastbackup &&
git remote show origin > output &&
- git diff expect output)
+ test_cmp expect output)
'
test_expect_success 'prune' '
@@ -179,7 +179,7 @@ test_expect_success 'update' '
git remote add apis ../mirror &&
git remote update &&
git branch -r > output &&
- git diff expect output)
+ test_cmp expect output)
'
@@ -206,7 +206,7 @@ test_expect_success 'update with arguments' '
git config remotes.titanus manduca &&
git remote update phobaeticus titanus &&
git branch -r > output &&
- git diff expect output)
+ test_cmp expect output)
'
@@ -229,7 +229,7 @@ test_expect_success 'update default' '
git config remote.drosophila.skipDefaultUpdate true &&
git remote update default &&
git branch -r > output &&
- git diff expect output)
+ test_cmp expect output)
'
@@ -249,7 +249,7 @@ test_expect_success 'update default (overridden, with funny whitespace)' '
git config remotes.default "$(printf "\t drosophila \n")" &&
git remote update default &&
git branch -r > output &&
- git diff expect output)
+ test_cmp expect output)
'