diff: fix a bug in diffing against stdin. Closes 7784

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/testsuite/diff.tests b/testsuite/diff.tests
index 6de4648..84d8538 100755
--- a/testsuite/diff.tests
+++ b/testsuite/diff.tests
@@ -44,6 +44,17 @@
 	"" \
 	"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" \
 "\