t4015: check "negative" case for "-w --color-moved"
commit83de23cfea3730293c52072376b28d87b37d756b
authorJeff King <peff@peff.net>
Thu, 19 Oct 2017 20:25:57 +0000 (19 16:25 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 21 Oct 2017 12:11:04 +0000 (21 21:11 +0900)
tree1b60eb7fd7a455f8e37fa606f083cc657022c319
parentecd512582cc40b732be342c49b9cb311a6dabc77
t4015: check "negative" case for "-w --color-moved"

We test that lines with whitespace changes are not found by
"--color-moved" by default, but are found if "-w" is added.
Let's add one more twist: a line that has non-whitespace
changes should not be marked as a pure move.

This is perhaps an obvious case for us to get right (and we
do), but as we add more whitespace tests, they will form a
pattern of "make sure this case is a move and this other
case is not".

Note that we have to add a line to our moved block, since
having a too-small block doesn't trigger the "moved"
heuristics.  And we also add a line of context to ensure
that there's more context lines than moved lines (so the
diff shows us moving the lines up, rather than moving the
context down).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4015-diff-whitespace.sh