Merge branch 'sg/doc-test-must-fail-args'
Devdoc update. * sg/doc-test-must-fail-args: t: document 'test_must_fail ok=<signal-name>'
This commit is contained in:
@ -610,6 +610,14 @@ list_contains () {
|
||||
#
|
||||
# Writing this as "! git checkout ../outerspace" is wrong, because
|
||||
# the failure could be due to a segv. We want a controlled failure.
|
||||
#
|
||||
# Accepts the following options:
|
||||
#
|
||||
# ok=<signal-name>[,<...>]:
|
||||
# Don't treat an exit caused by the given signal as error.
|
||||
# Multiple signals can be specified as a comma separated list.
|
||||
# Currently recognized signal names are: sigpipe, success.
|
||||
# (Don't use 'success', use 'test_might_fail' instead.)
|
||||
|
||||
test_must_fail () {
|
||||
case "$1" in
|
||||
@ -656,6 +664,8 @@ test_must_fail () {
|
||||
#
|
||||
# Writing "git config --unset all.configuration || :" would be wrong,
|
||||
# because we want to notice if it fails due to segv.
|
||||
#
|
||||
# Accepts the same options as test_must_fail.
|
||||
|
||||
test_might_fail () {
|
||||
test_must_fail ok=success "$@"
|
||||
|
||||
Reference in New Issue
Block a user