range-diff: add tests
authorThomas Rast <tr@thomasrast.ch>
Mon, 13 Aug 2018 11:33:16 +0000 (04:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Aug 2018 17:44:51 +0000 (10:44 -0700)
commit8884cf15fb8ed83b2a1ec8bb91f060f20082b277
tree052c453ab0c0ea4c5e6a05f18c254ae44584bf86
parent4eba1fe6156739e69e8cf3c1e84a9f050d91a884
range-diff: add tests

These are essentially lifted from https://github.com/trast/tbdiff, with
light touch-ups to account for the command now being named `git
range-diff`.

Apart from renaming `tbdiff` to `range-diff`, only one test case needed
to be adjusted: 11 - 'changed message'.

The underlying reason it had to be adjusted is that diff generation is
sometimes ambiguous. In this case, a comment line and an empty line are
added, but it is ambiguous whether they were added after the existing
empty line, or whether an empty line and the comment line are added
*before* the existing empty line. And apparently xdiff picks a different
option here than Python's difflib.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/.gitattributes
t/t3206-range-diff.sh [new file with mode: 0755]
t/t3206/history.export [new file with mode: 0644]