[PATCH v7 1/7] tests: test number comes first in 'not ok $count - $message'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 21, 2012, 03:12 UTC
- Message-ID
- <1356059558-23479-2-git-send-email-gitster@pobox.com>
- In-Reply-To
- <1356059558-23479-1-git-send-email-gitster@pobox.com>
From: Adam Spiers <git@adamspiers.org>
The old output to say "not ok - 1 messsage" was working by accident only because the test numbers are optional in TAP.
Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- t/t0000-basic.sh | 4 ++-- t/test-lib.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index ae6a3f0..c6b42de 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -167,13 +167,13 @@ test_expect_success 'tests clean up even on failures' " ! test -s err && ! test -f \"trash directory.failing-cleanup/clean-after-failure\" && sed -e 's/Z$//' -e 's/^> //' >expect <<-\\EOF && - > not ok - 1 tests clean up even after a failure + > not ok 1 - tests clean up even after a failure > # Z > # touch clean-after-failure && > # test_when_finished rm clean-after-failure && > # (exit 1) > # Z - > not ok - 2 failure to clean up causes the test to fail + > not ok 2 - failure to clean up causes the test to fail > # Z > # test_when_finished \"(exit 2)\" > # Z diff --git a/t/test-lib.sh b/t/test-lib.sh index f8e3733..03b86b8 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -268,7 +268,7 @@ test_ok_ () { test_failure_ () { test_failure=$(($test_failure + 1)) - say_color error "not ok - $test_count $1" + say_color error "not ok $test_count - $1" shift echo "$@" | sed -e 's/^/# /' test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
-- 1.8.1.rc2.225.g8d36ab4