[PATCH v2 10/10] test: fix "Stashing in notmuch-search" test when emacs is not available
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 17 Nov 2011 13:06:03 +0000 (17:06 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:17 +0000 (09:40 -0800)
d8/18c5ddb070c2254d04bd894fe58b6d5ff54a19 [new file with mode: 0644]

diff --git a/d8/18c5ddb070c2254d04bd894fe58b6d5ff54a19 b/d8/18c5ddb070c2254d04bd894fe58b6d5ff54a19
new file mode 100644 (file)
index 0000000..84409c0
--- /dev/null
@@ -0,0 +1,116 @@
+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 3ACB5429E27\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:07:23 -0800 (PST)\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 NOQ3BC42+JXN for <notmuch@notmuchmail.org>;\r
+       Thu, 17 Nov 2011 05:07:21 -0800 (PST)\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 8E812421160\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:06:47 -0800 (PST)\r
+Received: by mail-bw0-f53.google.com with SMTP id q10so2108356bka.26\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:06:47 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=s+kOJaad6c98M+Btf8INY0/6kzZcHQXI+7LkJqfzxMg=;\r
+       b=U6VB/hw/TlAegNvAoFAjgbnv2dnTm8F6REj9w0DcwEt4l7uTOkSDfmvO33Mv1MFGNC\r
+       5wBf35SXD2dkp7n0/GPJbQixxCDqTdM4sWWExIss72FHsqlHZzT3daGaExdeDBQVecEP\r
+       55DHL6O8BLtVxdneIX/kQWG0YuRnp3GLkvetA=\r
+Received: by 10.205.132.69 with SMTP id ht5mr25531707bkc.115.1321535207031;\r
+       Thu, 17 Nov 2011 05:06:47 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id z15sm41226701bkv.4.2011.11.17.05.06.45\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Thu, 17 Nov 2011 05:06:46 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 10/10] test: fix "Stashing in notmuch-search" test when\r
+       emacs is not available\r
+Date: Thu, 17 Nov 2011 17:06:03 +0400\r
+Message-Id: <1321535163-4895-11-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.7.2\r
+In-Reply-To: <1321535163-4895-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1321535163-4895-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: Thu, 17 Nov 2011 13:07:23 -0000\r
+\r
+If emacs is not available, test_expect_equal would be called with only\r
+one argument.  The patch fixes this by quoting the (possibly empty)\r
+$(cat OUTPUT) argument.\r
+---\r
+ test/emacs |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 75a0a74..9883f40 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -364,41 +364,41 @@ test_emacs '(notmuch-show "id:\"bought\"")\r
+         (switch-to-buffer\r
+           (generate-new-buffer "*test-stashing*"))\r
+         (dotimes (i 9)\r
+           (yank)\r
+           (insert "\n")\r
+           (rotate-yank-pointer 1))\r
+         (reverse-region (point-min) (point-max))\r
+           (test-output)'\r
+ sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT\r
+ test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing\r
\r
+ test_begin_subtest "Stashing in notmuch-search"\r
+ test_emacs '(notmuch-search "id:\"bought\"")\r
+         (notmuch-test-wait)\r
+         (notmuch-search-stash-thread-id)\r
+         (switch-to-buffer\r
+           (generate-new-buffer "*test-stashing*"))\r
+         (yank)\r
+           (test-output)'\r
+ sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT\r
+-test_expect_equal $(cat OUTPUT) "thread:XXX"\r
++test_expect_equal "$(cat OUTPUT)" "thread:XXX"\r
\r
+ test_begin_subtest 'Hiding message following HTML part'\r
+ test_subtest_known_broken\r
+ id='html-message@notmuchmail.org'\r
+ emacs_deliver_message \\r
+     'HTML message' \\r
+     '' \\r
+     "(message-goto-eoh)\r
+      (insert \"Message-ID: <$id>\n\")\r
+      (message-goto-body)\r
+      (mml-insert-part \"text/html\")\r
+      (insert \"<body>This is a test HTML message</body>\")"\r
+ emacs_deliver_message \\r
+     'Reply to HTML message' \\r
+     'This is a reply to the test HTML message' \\r
+     "(message-goto-eoh)\r
+      (insert \"In-Reply-To: <$id>\n\")"\r
+ test_emacs "(notmuch-show \"id:$id\") \\r
+             (notmuch-show-next-message) \\r
+             (command-execute (key-binding (kbd \"RET\"))) \\r
+-- \r
+1.7.7.2\r
+\r