summaryrefslogtreecommitdiff
path: root/t/t1450-fsck.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2010-02-20 00:18:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-20 05:56:19 (GMT)
commit4551d03541e5eec411bb367f7967ff933d176df4 (patch)
tree7cbc005e8daf8ac9dcb6ec4bb520f598e6f4303f /t/t1450-fsck.sh
parente9e921981d10554a325f4a1e67e920947e0e4800 (diff)
downloadgit-4551d03541e5eec411bb367f7967ff933d176df4.zip
git-4551d03541e5eec411bb367f7967ff933d176df4.tar.gz
git-4551d03541e5eec411bb367f7967ff933d176df4.tar.bz2
t1450: fix testcases that were wrongly expecting failure
Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I introduced two testcases that were expecting failure. However, the only bug was that the testcases wrote *blobs* because I forgot to pass -t tag to hash-object. Fix this, and then adjust the rest of the test to properly check the result. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1450-fsck.sh')
-rwxr-xr-xt/t1450-fsck.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index a22632f..49cae3e 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -66,12 +66,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
-test_expect_failure 'tag pointing to nonexistent' '
- tag=$(git hash-object -w --stdin < invalid-tag) &&
+test_expect_success 'tag pointing to nonexistent' '
+ tag=$(git hash-object -t tag -w --stdin < invalid-tag) &&
echo $tag > .git/refs/tags/invalid &&
- git fsck --tags 2>out &&
+ test_must_fail git fsck --tags >out &&
cat out &&
- grep "could not load tagged object" out &&
+ grep "broken link" out &&
rm .git/refs/tags/invalid
'
@@ -84,12 +84,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
-test_expect_failure 'tag pointing to something else than its type' '
- tag=$(git hash-object -w --stdin < wrong-tag) &&
+test_expect_success 'tag pointing to something else than its type' '
+ tag=$(git hash-object -t tag -w --stdin < wrong-tag) &&
echo $tag > .git/refs/tags/wrong &&
- git fsck --tags 2>out &&
+ test_must_fail git fsck --tags 2>out &&
cat out &&
- grep "some sane error message" out &&
+ grep "error in tag.*broken links" out &&
rm .git/refs/tags/wrong
'