pickaxe tests: add test for diffgrep_consume() internals
commitc9609398580518dffaadaace17188c901a4a4522
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 12 Apr 2021 17:15:10 +0000 (12 19:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:47:31 +0000 (11 12:47 +0900)
tree25ae1ad072e1679c985263d657393bd05a5c1003
parent6d0a40166e87a78ca17fddeee25228ded92a169e
pickaxe tests: add test for diffgrep_consume() internals

In diffgrep_consume() we generate a diff, and then advance past the
"+" or "-" at the start of the line for matching. This has been done
ever since the code was added in f506b8e8b5f (git log/diff: add
-G<regexp> that greps in the patch text, 2010-08-23).

If we match "line" instead of "line + 1" no tests fail, i.e. we've got
zero coverage for whether any of our searches match the beginning of
the line or not. Let's add a test for this.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4209-log-pickaxe.sh