diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-22 14:24:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-22 14:24:20 -0700 |
commit | 68559c464a8d22d4c3cc0a258fb4317125ddd099 (patch) | |
tree | 9c94d5916fc2cf4c40b10b7233ceae933646763f /t/test-lib-functions.sh | |
parent | Merge branch 'rj/sparse-updates' into maint (diff) | |
parent | t: document 'test_must_fail ok=<signal-name>' (diff) | |
download | tgif-68559c464a8d22d4c3cc0a258fb4317125ddd099.tar.xz |
Merge branch 'sg/doc-test-must-fail-args' into maint
Devdoc update.
* sg/doc-test-must-fail-args:
t: document 'test_must_fail ok=<signal-name>'
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 67b5994afb..8a8a9329ee 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 "$@" |