about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-02-06 20:02:30 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-02-06 20:02:30 +0100
commitd0cc05244f2cf598f98dbaf42c2461be9763b0a4 (patch)
tree494b637a15a19fef608e0d4818757c2e557bae1f
parentb8336219090571b4f300c9b0e97876e2330448d0 (diff)
downloadxe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.tar.gz
xe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.tar.xz
xe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.zip
tests: only print unexpected output when the output differs
-rwxr-xr-xtests4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests b/tests
index 9f91c41..51a47a4 100755
--- a/tests
+++ b/tests
@@ -18,7 +18,9 @@ check_output() {
     fi
   fi
   printf 'not ok - %s\n' "$msg"
-  printf 'Unexpected output:\n%s\n' "$output" | sed 's/^/# /'
+  if [ "$output" != "$expected" ]; then
+    printf 'Unexpected output:\n%s\n' "$output" | sed 's/^/# /'
+  fi
 }
 
 printf '# simple tests\n'