tests: test number comes first in 'not ok $count - $message'
authorAdam Spiers <git@adamspiers.org>
Sun, 16 Dec 2012 18:28:09 +0000 (18:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Dec 2012 20:01:58 +0000 (12:01 -0800)
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
t/test-lib.sh
index ae6a3f077742c0504b8ed8f56b98289c704ce8f9..c6b42deef9ce9f381d51971376a294192cafd888 100755 (executable)
@@ -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
index f8e3733ea06478d4eccb483ef6c2e6b196bde02f..03b86b821dce69a40f8140798536a2292369a2dc 100644 (file)
@@ -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; }