chiark / gitweb /
Test suite: t-output: support expecting empty files
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Sep 2016 19:45:27 +0000 (20:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 Sep 2016 17:53:45 +0000 (18:53 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib

index 36237a7485ed008f136ff4afd1c03dd2f3f3a6e5..c403dc72b0e29acf5f60f6584a283789c71de8cb 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -364,7 +364,7 @@ t-cloned-fetched-good () {
 }
 
 t-output () {
-       printf "%s\n" "$1" >$tmp/t.want
+       printf "%s${1:+\n}" "$1" >$tmp/t.want
        shift
        "$@" >$tmp/t.got
        diff $tmp/t.want $tmp/t.got