From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 5A53B6DE0941 for ; Sat, 3 Jun 2017 10:48:31 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6TJ_pdcHkaPK for ; Sat, 3 Jun 2017 10:48:30 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id AAA6B6DE0C64 for ; Sat, 3 Jun 2017 10:48:18 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dHD8w-0002PZ-0Q; Sat, 03 Jun 2017 13:47:18 -0400 Received: (nullmailer pid 17094 invoked by uid 1000); Sat, 03 Jun 2017 17:48:04 -0000 From: David Bremner To: notmuch@notmuchmail.org, notmuch@freelists.org Subject: [PATCH 10/23] test: test parsing of malformed from addresses Date: Sat, 3 Jun 2017 14:47:41 -0300 Message-Id: <20170603174754.16911-11-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170603174754.16911-1-david@tethera.net> References: <20170603174754.16911-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 03 Jun 2017 17:48:31 -0000 This was previously tested in T200-thread-naming.sh, but failures due to changes in address parsing were confusing because they had nothing to do with threads. --- test/T050-new.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index ffa303ef..66235306 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -140,6 +140,13 @@ ln -s "$external_msg_filename" "$gen_msg_filename" output=$(NOTMUCH_NEW --debug) test_expect_equal "$output" "Added 1 new message to the database." +test_begin_subtest "Index malformed from address." +test_subtest_broken_gmime_3 +add_message '[subject]="test subject"' \ + '[date]="Sat, 13 Jan 2001 15:43:45 -0000"' \ + '[from]="Malformed From \"' +output=$(notmuch search --sort=newest-first from:malformed_from@notmuchmail.org | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-13 [1/1] Malformed From; test subject (inbox unread)" test_begin_subtest "Broken symlink aborts" ln -s does-not-exist "${MAIL_DIR}/broken" -- 2.11.0