diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-06 20:02:30 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-06 20:02:30 +0100 |
commit | d0cc05244f2cf598f98dbaf42c2461be9763b0a4 (patch) | |
tree | 494b637a15a19fef608e0d4818757c2e557bae1f | |
parent | b8336219090571b4f300c9b0e97876e2330448d0 (diff) | |
download | xe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.tar.gz xe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.tar.xz xe-d0cc05244f2cf598f98dbaf42c2461be9763b0a4.zip |
tests: only print unexpected output when the output differs
-rwxr-xr-x | tests | 4 |
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' |