Thread (43 messages) flat view 43 messages, 3 authors, 2016-06-15

Re: [PATCHv2 4/6] t7510: exit for loop with test result

From: Jeff King <hidden>
Date: 2016-06-15 23:01:37

On Fri, Jun 13, 2014 at 03:21:55PM +0200, Johannes Sixt wrote:
I don't think so. What is the outcome of

	false &&  # simulate a regression
	grep foo && exit 1
	! grep bar || exit 1

assuming that the '! grep bar' happens to be true? Answer: The regression
is not diagnosed because the &&-chain is broken.

*That* is what I think you described earlier in this thread as "I put
something failing on the first line of the original version, and the test
succeeded."
Yeah, I think that is the bit that I was missing from my original
confusion.

  false &&
  anything || exit 1

_does_ work. But that is not what is written. ;)

Thanks for pointing it out.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help