[PATCH 2/2] test: add "notmuch-show for message with invalid From" test
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 12 May 2011 13:56:26 +0000 (17:56 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:14 +0000 (09:38 -0800)
f4/13e3bb014d5ee0511127999499191ed40b69c1 [new file with mode: 0644]

diff --git a/f4/13e3bb014d5ee0511127999499191ed40b69c1 b/f4/13e3bb014d5ee0511127999499191ed40b69c1
new file mode 100644 (file)
index 0000000..a6774b4
--- /dev/null
@@ -0,0 +1,98 @@
+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 0F16D429E2C\r
+       for <notmuch@notmuchmail.org>; Thu, 12 May 2011 06:56:21 -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 c+NmSrGVc38a for <notmuch@notmuchmail.org>;\r
+       Thu, 12 May 2011 06:56:17 -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 8C5F2431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 12 May 2011 06:56:17 -0700 (PDT)\r
+Received: by bwg12 with SMTP id 12so1388034bwg.26\r
+       for <notmuch@notmuchmail.org>; Thu, 12 May 2011 06:56:15 -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=koq4PaH7rtKrHMqaxFWOmoPr6qSoOexc0jM6qsNPkRY=;\r
+       b=qZ+qc5wUofpiQbi8c9IaOPd4b+a2cUFUubi6XAzzConWZZAudZ92PyiATyN2CDMTmv\r
+       EBNhbRr/JwdNvYNHO3Ja80eugPu5R9bT5dyFIhfiD6XqQ02NAt91pxu/4OszSODbJo85\r
+       Fa/jtzng7dAaxSLwJobaSdI4waZngE6xtiF08=\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=R67+O6aGUA8vouAHUea1V8zSrex48G1H+Jw9RyfkzoIi8BCmvYkGgFY7xXpwpXnovk\r
+       Lr5hybvPqw4ZtG12pkzmhKaZbrDco/8qdNq2M1jr5gKCRQ7Fz83Fs/ri3pqkKG3HrtCd\r
+       Q/9cKLzQR1pNgD1dRBUGQZAgzcCQTsXSgu8Qw=\r
+Received: by 10.205.64.208 with SMTP id xj16mr253415bkb.60.1305208575846;\r
+       Thu, 12 May 2011 06:56:15 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id 5sm1666482faz.0.2011.05.12.06.56.14\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Thu, 12 May 2011 06:56:15 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH 2/2] test: add "notmuch-show for message with invalid From"\r
+       test\r
+Date: Thu, 12 May 2011 17:56:26 +0400\r
+Message-Id: <1305208586-24689-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.5.1\r
+In-Reply-To: <1305208586-24689-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1305208586-24689-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, 12 May 2011 13:56:21 -0000\r
+\r
+---\r
+ test/emacs |   13 +++++++++++++\r
+ 1 files changed, 13 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 2e85b0c..f2983a7 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -37,8 +37,21 @@ output=$(test_emacs "(notmuch-show \"$maildir_storage_thread\") (princ (buffer-s\r
+ expected=$(cat $EXPECTED/notmuch-show-thread-maildir-storage)\r
+ test_expect_equal "$output" "$expected"\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
++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
++'"Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)\r
++Subject: message-with-invalid-from\r
++To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Date: Tue, 05 Jan 2001 15:43:57 -0000\r
++\r
++This is just a test message (#1)'\r
++\r
+ test_begin_subtest "Navigation of notmuch-search to thread view"\r
+ output=$(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))')\r
++expected=$(cat $EXPECTED/notmuch-show-thread-maildir-storage)\r
+ test_expect_equal "$output" "$expected"\r
\r
+ test_begin_subtest "Add tag from search view"\r
+-- \r
+1.7.5.1\r
+\r