tests: test number comes first in 'not ok $count - $message'
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>
Adam Spiers committed
Dec 16, 2012 at 18:28 UTC
5e5c006eb713b785c6761c32b907e02abc277f9a
2 files changed
+3
-3
t/t0000-basic.sh
+2
-2
@@ -167,13 +167,13 @@ test_expect_success 'tests clean up even on failures' "
167
! test -s err &&
168
! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
169
sed -e 's/Z$//' -e 's/^> //' >expect <<-\\EOF &&
170
- > not ok - 1 tests clean up even after a failure
170
+ > not ok 1 - tests clean up even after a failure
171
> # Z
172
> # touch clean-after-failure &&
173
> # test_when_finished rm clean-after-failure &&
174
> # (exit 1)
175
> # Z
176
- > not ok - 2 failure to clean up causes the test to fail
176
+ > not ok 2 - failure to clean up causes the test to fail
177
> # Z
178
> # test_when_finished \"(exit 2)\"
179
> # Z
t/test-lib.sh
+1
-1
@@ -268,7 +268,7 @@ test_ok_ () {
268
269
test_failure_ () {
270
test_failure=$(($test_failure + 1))
271
- say_color error "not ok - $test_count $1"
271
+ say_color error "not ok $test_count - $1"
272
shift
273
echo "$@" | sed -e 's/^/# /'
274
test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }