diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-07-30 23:13:26 +0300 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-07-31 16:51:15 +0200 |
commit | ad27a6d3265b2e8a27030a01121afed639bed2da (patch) | |
tree | 267159f75d679b7477edb633f6ba4d1a921522cb /testsuite/diff.tests | |
parent | a47fccaa63449182a5d0c11cf03139a072f8c19c (diff) | |
download | busybox-ad27a6d3265b2e8a27030a01121afed639bed2da.tar.gz |
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>
Diffstat (limited to 'testsuite/diff.tests')
-rwxr-xr-x | testsuite/diff.tests | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/diff.tests b/testsuite/diff.tests index 84d853852..0ced0f248 100755 --- a/testsuite/diff.tests +++ b/testsuite/diff.tests @@ -98,6 +98,18 @@ testing "diff -B does not ignore changes whose lines are not all blank" \ "a\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" \ "diff -ub - input | $TRIM_TAB" \ "\ |