[PATCH 04/10] test: wrap and indent test_emacs calls
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Tue, 28 Jun 2011 04:45:05 +0000 (08:45 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:45 +0000 (09:38 -0800)
40/5b211c100b7f60ce439f6a8b1da62382349b2e [new file with mode: 0644]

diff --git a/40/5b211c100b7f60ce439f6a8b1da62382349b2e b/40/5b211c100b7f60ce439f6a8b1da62382349b2e
new file mode 100644 (file)
index 0000000..76559ff
--- /dev/null
@@ -0,0 +1,347 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E66E1429E4D\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xgc+z4Rf9Rde for <notmuch@notmuchmail.org>;\r
+       Mon, 27 Jun 2011 21:45:36 -0700 (PDT)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 73546429E52\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:36 -0700 (PDT)\r
+Received: by mail-bw0-f53.google.com with SMTP id 12so4889638bwg.26\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:36 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer\r
+       :in-reply-to:references;\r
+       bh=DhY71xJvQmQdmydEpQ3Xp0ZbaOb/2BSTwh3Y3fQE9mY=;\r
+       b=QnwuWrV4v9tJ7j9Af3J4NJaKhpbEDktXPBnbgUR89q/9wxgItGxY6IZFoyNsmrFCvV\r
+       8Cf9ytvnyGamyTWGupOgD78Y55GZe7pkMNkefkylBfX66KbN/ZCiTD5gqL5cdndfnrS1\r
+       Q8Fbu3DihY4gaRFW47OKvKOuWFH0Xek9EPN6U=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       b=QKvxLVa/5veZB0ajkIVkEyMsm4aGr6IW+WDbuQJdRDmKIvFfsSW/Pi1UKw27AOMakp\r
+       V1M9Jm0K1/9ozmbYQUwKLFCxXFg26Ix4tuXFVuERMcbWngqHdEF/VCvJ9rUYjR+rKQE2\r
+       uQDQ8jGR9p81yE+MxcIufa5fbgbJoWMXh8eZs=\r
+Received: by 10.205.82.80 with SMTP id ab16mr5101430bkc.66.1309236336045;\r
+       Mon, 27 Jun 2011 21:45:36 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id n3sm4742316bka.16.2011.06.27.21.45.34\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 27 Jun 2011 21:45:35 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 04/10] test: wrap and indent test_emacs calls\r
+Date: Tue, 28 Jun 2011 08:45:05 +0400\r
+Message-Id: <1309236311-2162-4-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 28 Jun 2011 04:45:39 -0000\r
+\r
+Most test_emacs calls have long arguments that consist of many\r
+expressions.  Putting them on a single line makes it hard to read\r
+and produces poor diff when they are changed.  The patch puts\r
+every expression in test_emacs calls on a separate line.\r
+---\r
+ test/emacs       |  124 ++++++++++++++++++++++++++++++++++++++++++++----------\r
+ test/test-lib.sh |   14 ++++++-\r
+ 2 files changed, 114 insertions(+), 24 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index f4ff3f1..fddb4a1 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -7,32 +7,51 @@ EXPECTED=../emacs.expected-output\r
+ add_email_corpus\r
\r
+ test_begin_subtest "Basic notmuch-hello view in emacs"\r
+-test_emacs '(notmuch-hello) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(notmuch-hello)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello\r
\r
+ test_begin_subtest "Saved search with 0 results"\r
+-test_emacs '(setq notmuch-show-empty-saved-searches t) (setq notmuch-saved-searches '\''(("inbox" . "tag:inbox") ("unread" . "tag:unread") ("empty" . "tag:doesnotexist"))) (notmuch-hello) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(setq notmuch-show-empty-saved-searches t)\r
++          (setq notmuch-saved-searches\r
++                '\''(("inbox" . "tag:inbox")\r
++                     ("unread" . "tag:unread")\r
++                     ("empty" . "tag:doesnotexist")))\r
++          (notmuch-hello)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-with-empty\r
\r
+ test_begin_subtest "No saved searches displayed (all with 0 results)"\r
+-test_emacs '(setq notmuch-saved-searches '\''(("empty" . "tag:doesnotexist"))) (notmuch-hello) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(setq notmuch-saved-searches\r
++                '\''(("empty" . "tag:doesnotexist")))\r
++          (notmuch-hello)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches\r
\r
+ test_begin_subtest "Basic notmuch-search view in emacs"\r
+-test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(notmuch-search "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox\r
\r
+ test_begin_subtest "Navigation of notmuch-hello to search results"\r
+-test_emacs '(notmuch-hello) (goto-char (point-min)) (re-search-forward "inbox") (widget-button-press (point)) (notmuch-test-wait) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(notmuch-hello)\r
++          (goto-char (point-min))\r
++          (re-search-forward "inbox")\r
++          (widget-button-press (point))\r
++          (notmuch-test-wait)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox\r
\r
+ test_begin_subtest "Basic notmuch-show view in emacs"\r
+ maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)\r
+-test_emacs "(notmuch-show \"$maildir_storage_thread\") (princ (buffer-string))" >OUTPUT\r
++test_emacs "(notmuch-show \"$maildir_storage_thread\")\r
++          (princ (buffer-string))" >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage\r
\r
+ test_begin_subtest "notmuch-show for message with invalid From"\r
+-add_message "[subject]=\"message-with-invalid-from\"" "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""\r
++add_message "[subject]=\"message-with-invalid-from\"" \\r
++          "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""\r
+ thread=$(notmuch search --output=threads subject:message-with-invalid-from)\r
+ output=$(test_emacs "(notmuch-show \"$thread\") (princ (buffer-string))")\r
+ test_expect_equal "$output" \\r
+@@ -44,33 +63,54 @@ Date: Tue, 05 Jan 2001 15:43:57 -0000\r
+ This is just a test message (#1)'\r
\r
+ test_begin_subtest "Navigation of notmuch-search to thread view"\r
+-test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (goto-char (point-min)) (re-search-forward "Working with Maildir") (notmuch-search-show-thread) (notmuch-test-wait) (princ (buffer-string))' >OUTPUT\r
++test_emacs '(notmuch-search "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (goto-char (point-min))\r
++          (re-search-forward "Working with Maildir")\r
++          (notmuch-search-show-thread)\r
++          (notmuch-test-wait)\r
++          (princ (buffer-string))' >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage\r
\r
+ test_begin_subtest "Add tag from search view"\r
+ os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)\r
+-test_emacs "(notmuch-search \"$os_x_darwin_thread\") (notmuch-test-wait) (notmuch-search-add-tag \"tag-from-search-view\")"\r
++test_emacs "(notmuch-search \"$os_x_darwin_thread\")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-add-tag \"tag-from-search-view\")"\r
+ output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-search-view unread)"\r
\r
+ test_begin_subtest "Remove tag from search view"\r
+-test_emacs "(notmuch-search \"$os_x_darwin_thread\") (notmuch-test-wait) (notmuch-search-remove-tag \"tag-from-search-view\")"\r
++test_emacs "(notmuch-search \"$os_x_darwin_thread\")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-remove-tag \"tag-from-search-view\")"\r
+ output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"\r
\r
+ test_begin_subtest "Add tag from notmuch-show view"\r
+-test_emacs "(notmuch-show \"$os_x_darwin_thread\") (notmuch-show-add-tag \"tag-from-show-view\")"\r
++test_emacs "(notmuch-show \"$os_x_darwin_thread\")\r
++          (notmuch-show-add-tag \"tag-from-show-view\")"\r
+ output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-show-view unread)"\r
\r
+ test_begin_subtest "Remove tag from notmuch-show view"\r
+-test_emacs "(notmuch-show \"$os_x_darwin_thread\") (notmuch-show-remove-tag \"tag-from-show-view\")"\r
++test_emacs "(notmuch-show \"$os_x_darwin_thread\")\r
++          (notmuch-show-remove-tag \"tag-from-show-view\")"\r
+ output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"\r
\r
+ test_begin_subtest "Message with .. in Message-Id:"\r
+ add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"'\r
+-test_emacs '(notmuch-search "id:\"123..456@example\"") (notmuch-test-wait) (notmuch-search-add-tag "search-add") (notmuch-search-add-tag "search-remove") (notmuch-search-remove-tag "search-remove") (notmuch-show "id:\"123..456@example\"") (notmuch-test-wait) (notmuch-show-add-tag "show-add") (notmuch-show-add-tag "show-remove") (notmuch-show-remove-tag "show-remove")'\r
++test_emacs '(notmuch-search "id:\"123..456@example\"")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-add-tag "search-add")\r
++          (notmuch-search-add-tag "search-remove")\r
++          (notmuch-search-remove-tag "search-remove")\r
++          (notmuch-show "id:\"123..456@example\"")\r
++          (notmuch-test-wait)\r
++          (notmuch-show-add-tag "show-add")\r
++          (notmuch-show-add-tag "show-remove")\r
++          (notmuch-show-remove-tag "show-remove")'\r
+ output=$(notmuch search 'id:"123..456@example"' | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Message with .. in Message-Id (inbox search-add show-add)"\r
\r
+@@ -83,7 +123,18 @@ mkdir -p mail/sent/tmp\r
\r
+ ../smtp-dummy sent_message &\r
+ smtp_dummy_pid=$!\r
+-test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it) (setq smtpmail-smtp-server \"localhost\") (setq smtpmail-smtp-service \"25025\") (notmuch-hello) (notmuch-mua-mail) (message-goto-to) (insert \"user@example.com\nDate: Fri, 29 Mar 1974 10:00:00 -0000\") (message-goto-subject) (insert \"Testing message sent via SMTP\") (message-goto-body) (insert \"This is a test that messages are sent via SMTP\") (message-send-and-exit)" >/dev/null 2>&1\r
++test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it)\r
++          (setq smtpmail-smtp-server \"localhost\")\r
++          (setq smtpmail-smtp-service \"25025\")\r
++          (notmuch-hello)\r
++          (notmuch-mua-mail)\r
++          (message-goto-to)\r
++          (insert \"user@example.com\nDate: Fri, 29 Mar 1974 10:00:00 -0000\")\r
++          (message-goto-subject)\r
++          (insert \"Testing message sent via SMTP\")\r
++          (message-goto-body)\r
++          (insert \"This is a test that messages are sent via SMTP\")\r
++          (message-send-and-exit)" >/dev/null 2>&1\r
+ wait ${smtp_dummy_pid}\r
\r
+ sed \\r
+@@ -109,7 +160,9 @@ output=$(notmuch search 'subject:"testing message sent via SMTP"' | notmuch_sear\r
+ test_expect_equal "$output" "thread:XXX   1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)"\r
\r
+ test_begin_subtest "notmuch-fcc-dirs set to nil"\r
+-test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT\r
++test_emacs "(setq notmuch-fcc-dirs nil)\r
++          (notmuch-mua-mail)\r
++          (princ (buffer-string))" > OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: \r
+@@ -124,7 +177,9 @@ mkdir -p mail/sent-string/new\r
+ mkdir -p mail/sent-string/tmp\r
\r
+ test_begin_subtest "notmuch-fcc-dirs set to a string"\r
+-test_emacs "(setq notmuch-fcc-dirs \"sent-string\") (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT\r
++test_emacs "(setq notmuch-fcc-dirs \"sent-string\")\r
++          (notmuch-mua-mail)\r
++          (princ (buffer-string))" > OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: \r
+@@ -143,7 +198,11 @@ mkdir -p mail/failure/new\r
+ mkdir -p mail/failure/tmp\r
\r
+ test_begin_subtest "notmuch-fcc-dirs set to a list (with match)"\r
+-test_emacs "(setq notmuch-fcc-dirs '((\"notmuchmail.org\" . \"sent-list-match\") (\".*\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT\r
++test_emacs "(setq notmuch-fcc-dirs\r
++                '((\"notmuchmail.org\" . \"sent-list-match\")\r
++                  (\".*\" . \"failure\")))\r
++          (notmuch-mua-mail)\r
++          (princ (buffer-string))" > OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: \r
+@@ -159,7 +218,11 @@ mkdir -p mail/sent-list-catch-all/new\r
+ mkdir -p mail/sent-list-catch-all/tmp\r
+  \r
+ test_begin_subtest "notmuch-fcc-dirs set to a list (catch-all)"\r
+-test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\".*\" . \"sent-list-catch-all\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT\r
++test_emacs "(setq notmuch-fcc-dirs\r
++                '((\"example.com\" . \"failure\")\r
++                  (\".*\" . \"sent-list-catch-all\")))\r
++          (notmuch-mua-mail)\r
++          (princ (buffer-string))" > OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: \r
+@@ -170,7 +233,11 @@ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
+ test_begin_subtest "notmuch-fcc-dirs set to a list (no match)"\r
+-test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\"nomatchhere.net\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT\r
++test_emacs "(setq notmuch-fcc-dirs\r
++                '((\"example.com\" . \"failure\")\r
++                  (\"nomatchhere.net\" . \"failure\")))\r
++          (notmuch-mua-mail)\r
++          (princ (buffer-string))" > OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: \r
+@@ -182,7 +249,12 @@ test_expect_equal_file OUTPUT EXPECTED\r
+ test_begin_subtest "Reply within emacs"\r
+ # We sed away everything before the ^From in the output to avoid getting\r
+ # confused by messages such as "Parsing /home/cworth/.mailrc... done"\r
+-test_emacs '(notmuch-search "subject:\"testing message sent via SMTP\"") (notmuch-test-wait) (notmuch-search-reply-to-thread) (princ (buffer-string))' | sed -ne '/^From/,$ p' | sed -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' >OUTPUT\r
++test_emacs '(notmuch-search "subject:\"testing message sent via SMTP\"")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-reply-to-thread)\r
++          (princ (buffer-string))' |\r
++sed -ne '/^From/,$ p' |\r
++sed -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: user@example.com\r
+@@ -197,17 +269,23 @@ test_expect_equal_file OUTPUT EXPECTED\r
\r
+ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"\r
+ # save as archive to test that Emacs does not re-compress .gz\r
+-echo ./attachment1.gz | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1\r
++echo ./attachment1.gz |\r
++test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")\r
++          (notmuch-show-save-attachments)' > /dev/null 2>&1\r
+ test_expect_equal_file attachment1.gz "$EXPECTED/attachment"\r
\r
+ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part"\r
+ # save as archive to test that Emacs does not re-compress .gz\r
+-echo ./attachment2.gz | test_emacs '(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5)' > /dev/null 2>&1\r
++echo ./attachment2.gz |\r
++test_emacs '(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5)' > /dev/null 2>&1\r
+ test_expect_equal_file attachment2.gz "$EXPECTED/attachment"\r
\r
+ test_begin_subtest "View raw message within emacs"\r
+ first_line=$(head -n1 $EXPECTED/raw-message-cf0c4d-52ad0a)\r
+-test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-view-raw-message) (princ (buffer-string))' | sed -ne "/$first_line/,\$ p" >OUTPUT\r
++test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")\r
++          (notmuch-show-view-raw-message)\r
++          (princ (buffer-string))' |\r
++sed -ne "/$first_line/,\$ p" >OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a\r
\r
+ test_begin_subtest "Hiding/showing signature in notmuch-show view"\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 5f61960..ad1506c 100755\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -394,7 +394,19 @@ emacs_deliver_message ()\r
+     mkdir -p "$MAIL_DIR"/sent/{cur,new,tmp}\r
+     ../smtp-dummy sent_message &\r
+     smtp_dummy_pid=$!\r
+-    test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it) (setq smtpmail-smtp-server \"localhost\") (setq smtpmail-smtp-service \"25025\") (notmuch-hello) (notmuch-mua-mail) (message-goto-to) (insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\") (message-goto-subject) (insert \"${subject}\") (message-goto-body) (insert \"${body}\") $@ (message-send-and-exit)" >/dev/null 2>&1\r
++    test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it)\r
++              (setq smtpmail-smtp-server \"localhost\")\r
++              (setq smtpmail-smtp-service \"25025\")\r
++              (notmuch-hello)\r
++              (notmuch-mua-mail)\r
++              (message-goto-to)\r
++              (insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\")\r
++              (message-goto-subject)\r
++              (insert \"${subject}\")\r
++              (message-goto-body)\r
++              (insert \"${body}\")\r
++              $@\r
++              (message-send-and-exit)" >/dev/null 2>&1\r
+     wait ${smtp_dummy_pid}\r
+     notmuch new >/dev/null\r
+ }\r
+-- \r
+1.7.5.4\r
+\r