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 36237a7..c403dc7 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -364,7 +364,7 @@ t-cloned-fetched-good () {
 }
 
 t-output () {
 }
 
 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
        shift
        "$@" >$tmp/t.got
        diff $tmp/t.want $tmp/t.got