diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2018-02-09 05:42:33 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-12 22:00:38 +0300 |
commit | 12e31a6b12b0a8497f35b327219c348186e0a666 (patch) | |
tree | 37791a2a0a104b66ab1d1a9cc75f79fcfda3255d /t/README | |
parent | fc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff) |
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/README')
-rw-r--r-- | t/README | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -658,7 +658,7 @@ library for your script to use. test_expect_code 1 git merge "merge msg" B master ' - - test_must_fail <git-command> + - test_must_fail [<options>] <git-command> Run a git command and ensure it fails in a controlled way. Use this instead of "! <git-command>". When git-command dies due to a @@ -666,11 +666,21 @@ library for your script to use. treats it as just another expected failure, which would let such a bug go unnoticed. - - test_might_fail <git-command> + 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_might_fail [<options>] <git-command> Similar to test_must_fail, but tolerate success, too. Use this instead of "<git-command> || :" to catch failures due to segv. + Accepts the same options as test_must_fail. + - test_cmp <expected> <actual> Check whether the content of the <actual> file matches the |