diff.tests: add testcases for -B and single line changes

Add testcases for -B and single line changes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Aaro Koskinen 2015-07-30 23:13:26 +03:00 committed by Denys Vlasenko
parent a47fccaa63
commit ad27a6d326

View File

@ -98,6 +98,18 @@ testing "diff -B does not ignore changes whose lines are not all blank" \
"a\n" \ "a\n" \
"\nb\n\n" "\nb\n\n"
testing "diff -B ignores blank single line change" \
'diff -qB - input; echo $?' \
"0\n" \
"\n1\n" \
"1\n"
testing "diff -B does not ignore non-blank single line change" \
'diff -qB - input; echo $?' \
"Files - and input differ\n1\n" \
"0\n" \
"1\n"
testing "diff always takes context from old file" \ testing "diff always takes context from old file" \
"diff -ub - input | $TRIM_TAB" \ "diff -ub - input | $TRIM_TAB" \
"\ "\