Re: [PATCH] t2400: Fix test failures when using grep 2.5

From
Jacob Abel <hidden>
Date
2023-07-15 23:36:25
Reply to
Phillip Wood, 2023-07-15
On 23/07/15 07:15PM, Jacob Abel wrote:
On 23/07/15 09:59AM, Phillip Wood wrote:
quoted
[...]
[...]
quoted
Using grep like this makes it harder to debug test failures as one has
to run the test with "-x" in order to try and figure out which grep
actually failed. I think here we can replace the sequence of "grep"s
with "test_cmp"

	cat >expect <<-EOF &&
	HEAD points to an invalid (or orphaned) reference
	HEAD path: $headpath
	HEAD contents: $headcontents
	EOF

	test_cmp expect actual
I'll make these changes.
Actually now that I'm sitting down to make these changes, I'm a bit
hesitant as to whether this would be a cleaner solution than what is
currently there. I say this as the contents of `actual` are about
10-12 lines in length and some of those lines would vary between the
different tests that use this test function. Those specific details
don't need to be tested for as they are validated in prior tests and
building a perfectly matching `expected` would further complicate that
fairly large test function.
quoted
[...]
  
Thread (17 messages) 17 messages, 2 authors, last reply 2023-07-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help