diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-23 22:28:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-24 00:01:56 -0700 |
commit | 3af828634fa5bdbca1b2061a81df8b3fa73b0d34 (patch) | |
tree | f4d4a50e8c1686b3ecd796a09f98cc6ca13bc907 /t/t6200-fmt-merge-msg.sh | |
parent | 998b912927281a871e8d379e2b3a4385c775c4fe (diff) | |
download | git-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/t6200-fmt-merge-msg.sh')
-rwxr-xr-x | t/t6200-fmt-merge-msg.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index c9bf6fdba3..bc74349416 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 |