mirror of
https://github.com/git/git.git
synced 2024-06-05 14:26:31 +02:00
Merge branch 'ab/test-tap-fix-for-immediate'
Fix test framework a bit. * ab/test-tap-fix-for-immediate: test-lib: have --immediate emit valid TAP on failure
This commit is contained in:
commit
53747016a6
|
@ -101,6 +101,19 @@ test_expect_success 'subtest: 2/3 tests passing' '
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'subtest: --immediate' '
|
||||||
|
run_sub_test_lib_test_err partial-pass \
|
||||||
|
--immediate &&
|
||||||
|
check_sub_test_lib_test_err partial-pass \
|
||||||
|
<<-\EOF_OUT 3<<-EOF_ERR
|
||||||
|
> ok 1 - passing test #1
|
||||||
|
> not ok 2 - failing test #2
|
||||||
|
> # false
|
||||||
|
> 1..2
|
||||||
|
EOF_OUT
|
||||||
|
EOF_ERR
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'subtest: a failing TODO test' '
|
test_expect_success 'subtest: a failing TODO test' '
|
||||||
write_and_run_sub_test_lib_test failing-todo <<-\EOF &&
|
write_and_run_sub_test_lib_test failing-todo <<-\EOF &&
|
||||||
test_expect_success "passing test" "true"
|
test_expect_success "passing test" "true"
|
||||||
|
|
|
@ -806,7 +806,11 @@ test_failure_ () {
|
||||||
say_color error "not ok $test_count - $1"
|
say_color error "not ok $test_count - $1"
|
||||||
shift
|
shift
|
||||||
printf '%s\n' "$*" | sed -e 's/^/# /'
|
printf '%s\n' "$*" | sed -e 's/^/# /'
|
||||||
test "$immediate" = "" || _error_exit
|
if test -n "$immediate"
|
||||||
|
then
|
||||||
|
say_color error "1..$test_count"
|
||||||
|
_error_exit
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
test_known_broken_ok_ () {
|
test_known_broken_ok_ () {
|
||||||
|
|
Loading…
Reference in New Issue