Re: [PATCH v1 1/2] implement test_might_fail using a refactored test_must_fail

2015-11-28 Thread Jeff King
On Fri, Nov 27, 2015 at 12:37:38PM +, Ramsay Jones wrote: > > - if test $exit_code = 0; then > > + if ! list_contains "$_test_ok" success && test "$exit_code" -eq 0 > > + then > > minor nit: > > I would prefer this was 'if test $exit_code -eq 0 && ! list_contains ...' > > ie. the test

Re: [PATCH v1 1/2] implement test_might_fail using a refactored test_must_fail

2015-11-27 Thread Ramsay Jones
On 27/11/15 09:15, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > Add an (optional) first parameter "ok=" to test_must_fail > and return success for "". Add "success" as > "" and use it to implement "test_might_fail". This removes > redundancies in test-lib-function.sh. > > You can

[PATCH v1 1/2] implement test_might_fail using a refactored test_must_fail

2015-11-27 Thread larsxschneider
From: Lars Schneider Add an (optional) first parameter "ok=" to test_must_fail and return success for "". Add "success" as "" and use it to implement "test_might_fail". This removes redundancies in test-lib-function.sh. You can pass multiple arguments divided by comma (e.g. "test_must_fail ok=s