From 07d5046532887b7a2c20a8f04a72d06d0e63022d Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Sat, 22 Nov 2014 10:57:42 +1900 Subject: [PATCH] [PATCH v2 2/2] test: Add test for correct naming of author. --- f1/4790c900636b129d97b2933c091e29cc12b240 | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 f1/4790c900636b129d97b2933c091e29cc12b240 diff --git a/f1/4790c900636b129d97b2933c091e29cc12b240 b/f1/4790c900636b129d97b2933c091e29cc12b240 new file mode 100644 index 000000000..a0a14b381 --- /dev/null +++ b/f1/4790c900636b129d97b2933c091e29cc12b240 @@ -0,0 +1,77 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id DA1CE431FAE + for ; Fri, 21 Nov 2014 07:58:05 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.026 +X-Spam-Level: +X-Spam-Status: No, score=-1.026 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=1.274] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ZUWOh7FnPnKf for ; + Fri, 21 Nov 2014 07:58:01 -0800 (PST) +Received: from smtpauth.johnshopkins.edu (unknown [162.129.8.150]) + (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 659E9431FC0 + for ; Fri, 21 Nov 2014 07:57:56 -0800 (PST) +X-IronPort-AV: E=Sophos;i="5.07,432,1413259200"; d="scan'208";a="120034251" +Received: from guppy.hwcampus.jhu.edu (HELO localhost) ([10.161.32.234]) + by IPEB2.johnshopkins.edu with ESMTP/TLS/AES128-SHA; + 21 Nov 2014 10:57:54 -0500 +From: Jesse Rosenthal +To: notmuch@notmuchmail.org +Subject: [PATCH v2 2/2] test: Add test for correct naming of author. +Date: Fri, 21 Nov 2014 10:57:42 -0500 +Message-Id: <1416585462-24558-3-git-send-email-jrosenthal@jhu.edu> +X-Mailer: git-send-email 2.1.3 +In-Reply-To: <1416585462-24558-1-git-send-email-jrosenthal@jhu.edu> +References: <1416585462-24558-1-git-send-email-jrosenthal@jhu.edu> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 21 Nov 2014 15:58:06 -0000 + +This is a new test file, since handling of unusual email addresses +doesn't seem to fit well in any of our existing tests. + +Signed-off-by: Jesse Rosenthal +--- + test/T205-author-naming.sh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + create mode 100755 test/T205-author-naming.sh + +diff --git a/test/T205-author-naming.sh b/test/T205-author-naming.sh +new file mode 100755 +index 0000000..cb678ae +--- /dev/null ++++ b/test/T205-author-naming.sh +@@ -0,0 +1,12 @@ ++#!/usr/bin/env bash ++test_description="naming of authors with unusual addresses" ++. ./test-lib.sh ++ ++test_begin_subtest "Add author with empty quoted real name" ++add_message '[subject]="author-naming: Initial thread subject"' \ ++ '[date]="Fri, 05 Jan 2001 15:43:56 -0000"' \ ++ '[from]="\"\" "' ++output=$(notmuch search --sort=oldest-first author-naming and tag:inbox | notmuch_search_sanitize) ++test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] address@example.com; author-naming: Initial thread subject (inbox unread)" ++ ++test_done +-- +2.1.3 + -- 2.26.2