[PATCH 9/9] test: fix "Stashing in notmuch-search" test when emacs is not available

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Wed Nov 16 17:56:26 PST 2011


If emacs is not available, test_expect_equal would be called with only
one argument.  The patch fixes this by quoting the (possibly empty)
$(cat OUTPUT) argument.
---
 test/emacs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/emacs b/test/emacs
index 75a0a74..9883f40 100755
--- a/test/emacs
+++ b/test/emacs
@@ -364,41 +364,41 @@ test_emacs '(notmuch-show "id:\"bought\"")
         (switch-to-buffer
           (generate-new-buffer "*test-stashing*"))
         (dotimes (i 9)
           (yank)
           (insert "\n")
           (rotate-yank-pointer 1))
         (reverse-region (point-min) (point-max))
 	    (test-output)'
 sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT
 test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing
 
 test_begin_subtest "Stashing in notmuch-search"
 test_emacs '(notmuch-search "id:\"bought\"")
         (notmuch-test-wait)
         (notmuch-search-stash-thread-id)
         (switch-to-buffer
           (generate-new-buffer "*test-stashing*"))
         (yank)
 	    (test-output)'
 sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT
-test_expect_equal $(cat OUTPUT) "thread:XXX"
+test_expect_equal "$(cat OUTPUT)" "thread:XXX"
 
 test_begin_subtest 'Hiding message following HTML part'
 test_subtest_known_broken
 id='html-message at notmuchmail.org'
 emacs_deliver_message \
     'HTML message' \
     '' \
     "(message-goto-eoh)
      (insert \"Message-ID: <$id>\n\")
      (message-goto-body)
      (mml-insert-part \"text/html\")
      (insert \"<body>This is a test HTML message</body>\")"
 emacs_deliver_message \
     'Reply to HTML message' \
     'This is a reply to the test HTML message' \
     "(message-goto-eoh)
      (insert \"In-Reply-To: <$id>\n\")"
 test_emacs "(notmuch-show \"id:$id\") \
             (notmuch-show-next-message) \
             (command-execute (key-binding (kbd \"RET\"))) \
-- 
1.7.7.2



More information about the notmuch mailing list