From 39f017293a047ac1063c84263d4d855b86c62ba1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 11 Jan 2015 16:41:54 +0100 Subject: diff: fix a bug in diffing against stdin. Closes 7784 Signed-off-by: Denys Vlasenko --- testsuite/diff.tests | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testsuite') diff --git a/testsuite/diff.tests b/testsuite/diff.tests index 6de46483b..84d853852 100755 --- a/testsuite/diff.tests +++ b/testsuite/diff.tests @@ -44,6 +44,17 @@ testing "diff of stdin, twice" \ "" \ "stdin" +testing "diff of empty file against stdin" \ + "diff -u - input | $TRIM_TAB" \ +"\ +--- - ++++ input +@@ -1 +0,0 @@ +-a +" \ + "" \ + "a\n" + testing "diff of empty file against nonempty one" \ "diff -u - input | $TRIM_TAB" \ "\ -- cgit v1.2.3