diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2018-02-09 02:42:33 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-12 19:00:38 (GMT) |
commit | 12e31a6b12b0a8497f35b327219c348186e0a666 (patch) | |
tree | 37791a2a0a104b66ab1d1a9cc75f79fcfda3255d /t/test-lib-functions.sh | |
parent | fc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff) | |
download | git-12e31a6b12b0a8497f35b327219c348186e0a666.zip git-12e31a6b12b0a8497f35b327219c348186e0a666.tar.gz git-12e31a6b12b0a8497f35b327219c348186e0a666.tar.bz2 |
t: document 'test_must_fail ok=<signal-name>'
Since 'test_might_fail' is implemented as a thin wrapper around
'test_must_fail', it also accepts the same options. Mention this in
the docs as well.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 1701fe2..26b149a 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -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 "$@" |