From: Aaro Koskinen Date: Thu, 30 Jul 2015 20:13:26 +0000 (+0300) Subject: diff.tests: add testcases for -B and single line changes X-Git-Tag: 1_24_0~77 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ad27a6d3265b2e8a27030a01121afed639bed2da;p=oweals%2Fbusybox.git diff.tests: add testcases for -B and single line changes Add testcases for -B and single line changes. Signed-off-by: Aaro Koskinen Signed-off-by: Denys Vlasenko --- 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" \ "\