]> git.ipfire.org Git - thirdparty/git.git/commit
implement test_might_fail using a refactored test_must_fail
authorLars Schneider <larsxschneider@gmail.com>
Fri, 27 Nov 2015 09:15:13 +0000 (10:15 +0100)
committerJeff King <peff@peff.net>
Sat, 28 Nov 2015 17:04:28 +0000 (12:04 -0500)
commitbbfe5302d50891233cef645b74324c01d8b004c8
treeae2cb801a2170163d529e51f92a7ae707c152bb9
parent0c83680e9c047170614fb08ef222ea4f460e514d
implement test_might_fail using a refactored test_must_fail

Add an (optional) first parameter "ok=<special case>" to test_must_fail
and return success for "<special case>". Add "success" as
"<special case>" and use it to implement "test_might_fail". This removes
redundancies in test-lib-function.sh.

You can pass multiple <special case> arguments divided by comma (e.g.
"test_must_fail ok=success,something")

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Jeff King <peff@peff.net>
t/test-lib-functions.sh