From d0cc05244f2cf598f98dbaf42c2461be9763b0a4 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 6 Feb 2016 20:02:30 +0100 Subject: tests: only print unexpected output when the output differs --- tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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' -- cgit 1.4.1