t4124: avoid using "normal" diff mode

Everybody and their dogs, cats and other pets settled on using unified
diffs. It is a really quaint holdover from a long-gone era that GNU diff
outputs "normal" diff by default.

Yet, t4124 relied on that mode.

This mode is so out of fashion in the meantime, though, that e.g.
BusyBox' diff decided not even to bother to support it. It only supports
unified diffs.

So let's just switch away from "normal" diffs and use unified diffs, as
we really are only interested in the `+` lines.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2017-07-05 22:21:57 +02:00
parent c224b10d4a
commit 9dbc8de85c

View File

@@ -45,7 +45,7 @@ test_fix () {
apply_patch --whitespace=fix || return 1
# find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed
$DIFF -u file target | sed -n -e "3,\$s/^+//p" >fixed
# the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed)