]> git.notmuchmail.org Git - notmuch/commitdiff
test: Produce useful output when the HTML with images test fails
authorAustin Clements <amdragon@MIT.EDU>
Tue, 20 Nov 2012 15:58:45 +0000 (10:58 -0500)
committerDavid Bremner <bremner@debian.org>
Wed, 21 Nov 2012 22:52:23 +0000 (18:52 -0400)
Previously, this would simply indicate that the grep failed without
any indication of the Emacs output it failed on.  Now we take
advantage of the test framework's handling of stdout to display the
incorrect Emacs output if the test fails.

test/emacs

index 77265b026430d5a30d23cca426ff72153d623c5e..5649d55f34e197c04d6a57b1021e9fa0f8878cf4 100755 (executable)
@@ -809,9 +809,10 @@ test_emacs "(let ((mm-text-html-renderer
              (notmuch-show \"id:${gen_msg_id}\"))
            (test-output)" > /dev/null
 # Different Emacs versions and renderers give very different results,
-# so just check that something reasonable showed up.
+# so just check that something reasonable showed up.  We first cat the
+# output so the test framework will print it if the test fails.
 test_expect_success "Rendering HTML mail with images" \
-    'grep -q smiley OUTPUT'
+    'cat OUTPUT && grep -q smiley OUTPUT'
 
 
 test_done