Re: [PATCH v2 09/27] userdiff tests: match full hunk headers

2 messages, 2 authors, 2021-02-17 · open the first message on its own page

Re: [PATCH v2 09/27] userdiff tests: match full hunk headers

From: Junio C Hamano <hidden>
Date: 2021-02-17 02:04:07

Junio C Hamano [off-list ref] writes:
+		sed -ne "s/^@@[^@]*@@//p" actual |
+		if test -n "$HEAD"
+		then
+			grep -F "$HEAD"
I think this should also use "-x" (match the whole line) if it is
portable enough; the option should be available in POSIX.1 but we
haven't used it anywhere in our test suite.
+		else
+			grep "^.*RIGHT"
+		fi
+	'
 done

Re: [PATCH v2 09/27] userdiff tests: match full hunk headers

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-02-17 02:14:35

On Wed, Feb 17 2021, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
+		sed -ne "s/^@@[^@]*@@//p" actual |
+		if test -n "$HEAD"
+		then
+			grep -F "$HEAD"
I think this should also use "-x" (match the whole line) if it is
portable enough; the option should be available in POSIX.1 but we
haven't used it anywhere in our test suite.
Isn't that just test_cmp with no debug output when it fails? Noted in
https://lore.kernel.org/git/87h7mba3h3.fsf@evledraar.gmail.com/
quoted
+		else
+			grep "^.*RIGHT"
+		fi
+	'
 done

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