Skip to content

Commit 5e5c006

Browse files
aspiersgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b0576a6 commit 5e5c006

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

t/t0000-basic.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ test_expect_success 'tests clean up even on failures' "
167167
! test -s err &&
168168
! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
169169
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
171171
> # Z
172172
> # touch clean-after-failure &&
173173
> # test_when_finished rm clean-after-failure &&
174174
> # (exit 1)
175175
> # 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
177177
> # Z
178178
> # test_when_finished \"(exit 2)\"
179179
> # Z

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ test_ok_ () {
268268

269269
test_failure_ () {
270270
test_failure=$(($test_failure + 1))
271-
say_color error "not ok - $test_count $1"
271+
say_color error "not ok $test_count - $1"
272272
shift
273273
echo "$@" | sed -e 's/^/# /'
274274
test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }

0 commit comments

Comments
 (0)