summaryrefslogtreecommitdiff
path: root/t/t4117-apply-reject.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/t4117-apply-reject.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/t4117-apply-reject.sh')
-rwxr-xr-xt/t4117-apply-reject.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t4117-apply-reject.sh b/t/t4117-apply-reject.sh
index 659e17c92e..e9ccd161ee 100755
--- a/t/t4117-apply-reject.sh
+++ b/t/t4117-apply-reject.sh
@@ -54,7 +54,7 @@ test_expect_success 'apply without --reject should fail' '
exit 1
fi
- git diff file1 saved.file1
+ test_cmp file1 saved.file1
'
test_expect_success 'apply without --reject should fail' '
@@ -65,7 +65,7 @@ test_expect_success 'apply without --reject should fail' '
exit 1
fi
- git diff file1 saved.file1
+ test_cmp file1 saved.file1
'
test_expect_success 'apply with --reject should fail but update the file' '
@@ -79,7 +79,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
exit 1
fi
- git diff file1 expected &&
+ test_cmp file1 expected &&
cat file1.rej &&
@@ -105,7 +105,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
echo "file1 still exists?"
exit 1
}
- git diff file2 expected &&
+ test_cmp file2 expected &&
cat file2.rej &&
@@ -132,7 +132,7 @@ test_expect_success 'the same test with --verbose' '
echo "file1 still exists?"
exit 1
}
- git diff file2 expected &&
+ test_cmp file2 expected &&
cat file2.rej &&
@@ -151,7 +151,7 @@ test_expect_success 'apply cleanly with --verbose' '
git apply --verbose patch.1 &&
- git diff file1 clean
+ test_cmp file1 clean
'
test_done