From: Derrick Stolee Date: Wed, 05 Jun 2019 00:57:13 GMT Subject: Re: Git Test Coverage Report (Thursday, May 30th) Message-ID: <9018d6bb-3bc1-824d-e61e-e37bb1587640@gmail.com> In-Reply-To: <09bc8c7a-bab5-7cdb-75dc-f7c45a4dbaf8@google.com> On 6/4/2019 4:41 PM, Barret Rhoden wrote: > Hi - > > On 6/4/19 12:38 PM, Barret Rhoden wrote: > However, the only thing we are really testing is that git blame didn't crash. This would not be enough. > There is no detectable change to the output.  AFAIK, blame_coalesce() is a performance enhancement. Thank you for stating that the output didn't change. I tested this locally, and did see that the behavior was identical. I think you should just make the test be complete by checking a post-condition. Please see the inserted lines below (which _should_ work, I haven't actually ran this in the test suite). > +test_expect_success 'blame coalesce' ' > +    cat >giraffe <<-\EOF && > +    ABC > +    DEF > +    EOF > +    git add giraffe && > +    git commit -m "original file" && oid=$(git rev-parse HEAD) && > +    > +    cat >giraffe <<-\EOF && > +    ABC > +    XXX > +    DEF > +    EOF > +    git add giraffe && > +    git commit -m "interior XXX line" && > +    > +    cat >giraffe <<-\EOF && > +    ABC > +    DEF > +    EOF > +    git add giraffe && > +    git commit -m "same contents as original" && > + cat >expect <<-\EOF && ^$oid 1) ABC ^$oid 2) DEF EOF git -c core.abbrev=40 blame -s giraffe >actual && test_cmp expect actual > +' > + >  test_done >