{"thread":{"id":"22736","subject":"[PATCH] t1450: fix testcases that were wrongly expecting failure","startedAt":"2010-02-20T00:18:44Z","lastAt":"2010-02-20T00:18:44Z","messageCount":1,"participants":["Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"135135","messageId":"491d6695b46414db1721235759fa1887421c9915.1266625101.git.trast@student.ethz.ch","threadId":"22736","inReplyTo":null,"subject":"[PATCH] t1450: fix testcases that were wrongly expecting failure","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-02-20T00:18:44Z","receivedAt":"2010-02-20T00:18:44Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I\nintroduced two testcases that were expecting failure.\n\nHowever, the only bug was that the testcases wrote *blobs* because I\nforgot to pass -t tag to hash-object.  Fix this, and then adjust the\nrest of the test to properly check the result.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n t/t1450-fsck.sh |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\nindex a22632f..49cae3e 100755\n--- a/t/t1450-fsck.sh\n+++ b/t/t1450-fsck.sh\n@@ -66,12 +66,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000\n This is an invalid tag.\n EOF\n \n-test_expect_failure 'tag pointing to nonexistent' '\n-\ttag=$(git hash-object -w --stdin < invalid-tag) &&\n+test_expect_success 'tag pointing to nonexistent' '\n+\ttag=$(git hash-object -t tag -w --stdin < invalid-tag) &&\n \techo $tag > .git/refs/tags/invalid &&\n-\tgit fsck --tags 2>out &&\n+\ttest_must_fail git fsck --tags >out &&\n \tcat out &&\n-\tgrep \"could not load tagged object\" out &&\n+\tgrep \"broken link\" out &&\n \trm .git/refs/tags/invalid\n '\n \n@@ -84,12 +84,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000\n This is an invalid tag.\n EOF\n \n-test_expect_failure 'tag pointing to something else than its type' '\n-\ttag=$(git hash-object -w --stdin < wrong-tag) &&\n+test_expect_success 'tag pointing to something else than its type' '\n+\ttag=$(git hash-object -t tag -w --stdin < wrong-tag) &&\n \techo $tag > .git/refs/tags/wrong &&\n-\tgit fsck --tags 2>out &&\n+\ttest_must_fail git fsck --tags 2>out &&\n \tcat out &&\n-\tgrep \"some sane error message\" out &&\n+\tgrep \"error in tag.*broken links\" out &&\n \trm .git/refs/tags/wrong\n '\n \n-- \n1.7.0.139.gd1a75.dirty\n"}]}