mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-08 17:51:42 +01:00
test: move subtest variables reset into a dedicated function
Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future.
This commit is contained in:
parent
945196d79b
commit
1660ca5e61
1 changed files with 8 additions and 4 deletions
|
@ -429,7 +429,7 @@ test_begin_subtest ()
|
|||
error "bug in test script: Missing test_expect_equal in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}"
|
||||
fi
|
||||
test_subtest_name="$1"
|
||||
test_subtest_known_broken_=
|
||||
test_reset_state_
|
||||
# Remember stdout and stderr file descriptors and redirect test
|
||||
# output to the previously prepared file descriptors 3 and 4 (see
|
||||
# below)
|
||||
|
@ -581,14 +581,14 @@ test_failure_message_ () {
|
|||
}
|
||||
|
||||
test_known_broken_ok_ () {
|
||||
test_subtest_known_broken_=
|
||||
test_reset_state_
|
||||
test_fixed=$(($test_fixed+1))
|
||||
say_color pass "%-6s" "FIXED"
|
||||
echo " $@"
|
||||
}
|
||||
|
||||
test_known_broken_failure_ () {
|
||||
test_subtest_known_broken_=
|
||||
test_reset_state_
|
||||
test_broken=$(($test_broken+1))
|
||||
test_failure_message_ "BROKEN" "$@"
|
||||
return 1
|
||||
|
@ -624,7 +624,7 @@ test_skip () {
|
|||
fi
|
||||
case "$to_skip" in
|
||||
t)
|
||||
test_subtest_known_broken_=
|
||||
test_reset_state_
|
||||
say_color skip >&3 "skipping test: $@"
|
||||
say_color skip "%-6s" "SKIP"
|
||||
echo " $1"
|
||||
|
@ -864,6 +864,10 @@ test_emacs () {
|
|||
emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
|
||||
}
|
||||
|
||||
test_reset_state_ () {
|
||||
test_subtest_known_broken_=
|
||||
}
|
||||
|
||||
|
||||
find_notmuch_path ()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue