Re: test -chain lint

2015-03-20 Thread Junio C Hamano
. Thanks for working on this---I think test-chain-lint should become one of the pre-acceptance test on my end when it gets applied. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: test -chain lint (was: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository)

2015-03-20 Thread Eric Sunshine
On Fri, Mar 20, 2015 at 1:10 AM, Jeff King p...@peff.net wrote: On Thu, Mar 19, 2015 at 10:25:32PM -0400, Jeff King wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index c096778..02a03d5 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -524,6 +524,21 @@ test_eval_ () { test_run_

Re: test -chain lint

2015-03-20 Thread Jeff King
On Fri, Mar 20, 2015 at 10:04:43AM -0700, Junio C Hamano wrote: One case where this might misdetect a good test would be this one: test_expect_success 'either succeed or fail with status 1' ' git subcmd || case $? in 1) : happy ;; *) false failure ;; esac ' Yes. Any use of ||

Re: test -chain lint

2015-03-20 Thread Jeff King
On Fri, Mar 20, 2015 at 10:34:51AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Your case above is actually better spelled as test_expect_code, but there are more complex one-off cases that I solved using a {} block. Just for the record, test_expect_code expects only one

Re: test -chain lint

2015-03-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: Your case above is actually better spelled as test_expect_code, but there are more complex one-off cases that I solved using a {} block. Just for the record, test_expect_code expects only one possible good exit status and it does not allow us to say 0 is OK and

Re: test -chain lint

2015-03-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jeff King p...@peff.net writes: [+cc Jonathan, whose patch I apparently subconsciously copied] On Thu, Mar 19, 2015 at 10:08:51PM -0400, Jeff King wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index c096778..02a03d5 100644 --- a/t/test-lib.sh

Re: test -chain lint (was: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository)

2015-03-19 Thread Jeff King
On Thu, Mar 19, 2015 at 10:25:32PM -0400, Jeff King wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index c096778..02a03d5 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -524,6 +524,21 @@ test_eval_ () { test_run_ () { test_cleanup=: expecting_failure=$2 + + if

test -chain lint (was: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository)

2015-03-19 Thread Jeff King
On Thu, Mar 19, 2015 at 09:37:12PM -0400, Eric Sunshine wrote: Thanks. I notice that a large number of broken -chains are on here-docs. I really wish you could put the on the EOF line at the end of the here-doc. I understand _why_ that this not the case, but mentally it is where I want

Re: test -chain lint (was: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository)

2015-03-19 Thread Jeff King
[+cc Jonathan, whose patch I apparently subconsciously copied] On Thu, Mar 19, 2015 at 10:08:51PM -0400, Jeff King wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index c096778..02a03d5 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -524,6 +524,21 @@ test_eval_ () { test_run_ () {