From: Jeff King Date: Wed, 25 Mar 2015 05:31:41 +0000 (-0400) Subject: t0020: use test_* helpers instead of hand-rolled messages X-Git-Tag: v2.4.0-rc0~1^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/be86fb3f8d149b721ab7db63cf46020fd622806d?hp=--cc t0020: use test_* helpers instead of hand-rolled messages These tests are not wrong, but it is much shorter and more idiomatic to say "verbose" or "test_must_fail" rather than printing our own messages on failure. Likewise, there is no need to say "happy" at the end of a test; the test suite takes care of that. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- be86fb3f8d149b721ab7db63cf46020fd622806d diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh index 144fdcde7b..f94120a894 100755 --- a/t/t0020-crlf.sh +++ b/t/t0020-crlf.sh @@ -35,9 +35,7 @@ test_expect_success setup ' for w in Some extra lines here; do echo $w; done >>one && git diff >patch.file && patched=$(git hash-object --stdin .gitattributes && git read-tree --reset -u HEAD && - if has_cr dir/two - then - echo "Huh?" - false - else - : happy - fi + test_must_fail has_cr dir/two ' test_expect_success '.gitattributes says two and three are text' '