summaryrefslogtreecommitdiff
path: root/t/t6200-fmt-merge-msg.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-24 05:28:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-24 07:01:56 (GMT)
commit3af828634fa5bdbca1b2061a81df8b3fa73b0d34 (patch)
treef4d4a50e8c1686b3ecd796a09f98cc6ca13bc907 /t/t6200-fmt-merge-msg.sh
parent998b912927281a871e8d379e2b3a4385c775c4fe (diff)
downloadgit-3af828634fa5bdbca1b2061a81df8b3fa73b0d34.zip
git-3af828634fa5bdbca1b2061a81df8b3fa73b0d34.tar.gz
git-3af828634fa5bdbca1b2061a81df8b3fa73b0d34.tar.bz2
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/t6200-fmt-merge-msg.sh')
-rwxr-xr-xt/t6200-fmt-merge-msg.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index c9bf6fd..bc74349 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -79,7 +79,7 @@ test_expect_success 'merge-msg test #1' '
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
cat >expected <<EOF
@@ -92,7 +92,7 @@ test_expect_success 'merge-msg test #2' '
git fetch ../"$test" left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
cat >expected <<\EOF
@@ -117,7 +117,7 @@ test_expect_success 'merge-msg test #3-1' '
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_expect_success 'merge-msg test #3-2' '
@@ -131,7 +131,7 @@ test_expect_success 'merge-msg test #3-2' '
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
cat >expected <<\EOF
@@ -163,7 +163,7 @@ test_expect_success 'merge-msg test #4-1' '
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_expect_success 'merge-msg test #4-2' '
@@ -177,7 +177,7 @@ test_expect_success 'merge-msg test #4-2' '
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_expect_success 'merge-msg test #5-1' '
@@ -191,7 +191,7 @@ test_expect_success 'merge-msg test #5-1' '
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_expect_success 'merge-msg test #5-2' '
@@ -205,7 +205,7 @@ test_expect_success 'merge-msg test #5-2' '
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_done