[PATCH v3 1/2] test: Add known-broken test for empty author name
authorJesse Rosenthal <jrosenthal@jhu.edu>
Sat, 22 Nov 2014 13:17:15 +0000 (08:17 +1900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:46:49 +0000 (14:46 -0700)
c9/9d2d2a8fa7ff93fa1cc157fe642ac8748232bc [new file with mode: 0644]

diff --git a/c9/9d2d2a8fa7ff93fa1cc157fe642ac8748232bc b/c9/9d2d2a8fa7ff93fa1cc157fe642ac8748232bc
new file mode 100644 (file)
index 0000000..753a44b
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <prvs=396941042=jrosenthal@jhu.edu>\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 19506431FBF\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 05:17:04 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 Cm31Qriht1Wz for <notmuch@notmuchmail.org>;\r
+       Sat, 22 Nov 2014 05:16:56 -0800 (PST)\r
+Received: from smtpauth.johnshopkins.edu (smtpauth.johnshopkins.edu\r
+       [128.220.229.167]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 724D8431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 05:16:56 -0800 (PST)\r
+X-IronPort-AV: E=Sophos;i="5.07,437,1413259200"; d="scan'208";a="497023046"\r
+Received: from c-69-137-43-192.hsd1.md.comcast.net (HELO localhost)\r
+       ([69.137.43.192])\r
+       by IPMTW3.johnshopkins.edu with ESMTP/TLS/AES128-SHA;\r
+       22 Nov 2014 08:16:54 -0500\r
+From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 1/2] test: Add known-broken test for empty author name\r
+Date: Sat, 22 Nov 2014 08:17:15 -0500\r
+Message-Id: <1416662236-26556-2-git-send-email-jrosenthal@jhu.edu>\r
+X-Mailer: git-send-email 2.1.3\r
+In-Reply-To: <1416662236-26556-1-git-send-email-jrosenthal@jhu.edu>\r
+References: <1416662236-26556-1-git-send-email-jrosenthal@jhu.edu>\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: Sat, 22 Nov 2014 13:17:04 -0000\r
+\r
+We test for whether a quoted empty email address\r
+\r
+    "" <address@example.com>\r
+\r
+will show up as the address, instead of the empty string. This is\r
+marked as known-broken, since the current behavior is to use the empty\r
+string.\r
+\r
+This is a new test file, since handling of unusual email addresses\r
+doesn't seem to fit well in any of our existing tests.\r
+\r
+Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+---\r
+ test/T205-author-naming.sh | 13 +++++++++++++\r
+ 1 file changed, 13 insertions(+)\r
+ create mode 100755 test/T205-author-naming.sh\r
+\r
+diff --git a/test/T205-author-naming.sh b/test/T205-author-naming.sh\r
+new file mode 100755\r
+index 0000000..18819dd\r
+--- /dev/null\r
++++ b/test/T205-author-naming.sh\r
+@@ -0,0 +1,13 @@\r
++#!/usr/bin/env bash\r
++test_description="naming of authors with unusual addresses"\r
++. ./test-lib.sh\r
++\r
++test_begin_subtest "Add author with empty quoted real name"\r
++test_subtest_known_broken\r
++add_message '[subject]="author-naming: Initial thread subject"' \\r
++          '[date]="Fri, 05 Jan 2001 15:43:56 -0000"' \\r
++          '[from]="\"\" <address@example.com>"'\r
++output=$(notmuch search --sort=oldest-first author-naming and tag:inbox | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] address@example.com; author-naming: Initial thread subject (inbox unread)"\r
++\r
++test_done\r
+-- \r
+2.1.3\r
+\r