Re: [PATCH 1/3] t8003: check output of coalesced blame

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 13, 2020 at 10:04:51AM -0700, Junio C Hamano wrote:

> >  	cat >expect <<-EOF &&
> > -	$oid 1) ABC
> > -	$oid 2) DEF
> > +	$oid 1 1 2
> > +	$oid 2 2
> >  	EOF
> 
> It has become a bit harder to grok, but for the purpose of the later
> steps to see where things exactly came from (including their line
> numbers), it is easier to see what is going on with the new format.

Yeah, I agree the numbers are a bit more inscrutable. We could do
something like:

diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh
index ba8013b002..9486888e5a 100755
--- a/t/t8003-blame-corner-cases.sh
+++ b/t/t8003-blame-corner-cases.sh
@@ -301,12 +301,14 @@ test_expect_success 'setup coalesce tests' '
 '
 
 test_expect_success 'blame coalesce' '
-	cat >expect <<-EOF &&
+	q_to_tab >expect <<-EOF &&
 	$orig 1 1 2
+	QABC
 	$orig 2 2
+	QDEF
 	EOF
 	git blame --porcelain $final giraffe >actual.raw &&
-	grep "^$orig" actual.raw >actual &&
+	egrep "^($orig|	)" actual.raw >actual &&
 	test_cmp expect actual
 '

but IMHO that isn't much more readable (largely due to the
tab-handling in the here-doc).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux