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 1C461431FB5 for ; Sun, 8 May 2011 16:13:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 NC1c5R2vu7yX for ; Sun, 8 May 2011 16:13:27 -0700 (PDT) Received: from tesla.chaoflow.net (tesla.chaoflow.net [188.40.54.22]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7B3DA429E22 for ; Sun, 8 May 2011 16:13:25 -0700 (PDT) Received: from eve.chaoflow.net (ppp-188-174-25-68.dynamic.mnet-online.de [188.174.25.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: flo@chaoflow.net) by tesla.chaoflow.net (Postfix) with ESMTPSA id 2AF55C8CD; Mon, 9 May 2011 01:13:24 +0200 (CEST) Received: from eve.fritz.box (eve.chaoflow.net [127.0.0.1]) by eve.chaoflow.net (Postfix) with ESMTP id E9F2127D; Sun, 8 May 2011 23:13:23 +0000 (Local time zone must be set--see zic manual page) From: Florian Friesdorf To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test for sanitized notmuch-search output Date: Mon, 9 May 2011 01:13:15 +0200 Message-Id: <1304896395-7407-2-git-send-email-flo@chaoflow.net> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1304896395-7407-1-git-send-email-flo@chaoflow.net> References: <1304896395-7407-1-git-send-email-flo@chaoflow.net> X-Virus-Scanned: clamav-milter 0.96.5 at tesla X-Virus-Status: Clean 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: Sun, 08 May 2011 23:13:29 -0000 --- test/corpus.ccs/cur/1:2, | 8 ++++++++ test/search-output | 8 ++++++++ test/test-lib.sh | 12 ++++++++++++ 3 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 test/corpus.ccs/cur/1:2, diff --git a/test/corpus.ccs/cur/1:2, b/test/corpus.ccs/cur/1:2, new file mode 100644 index 0000000..60081c4 --- /dev/null +++ b/test/corpus.ccs/cur/1:2, @@ -0,0 +1,8 @@ +From: "Two =?ISO-8859-1?Q?line=0A_author?=" +To: notmuch@notmuchmail.org +Date: Tue, 17 Nov 2009 21:28:37 +0600 +Subject: [notmuch] two =?ISO-8859-1?Q?line=0A_subject?= + headers +Message-ID: <123> + +body diff --git a/test/search-output b/test/search-output index 33ae119..202c13e 100755 --- a/test/search-output +++ b/test/search-output @@ -316,4 +316,12 @@ cat <EXPECTED EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "notmuch search for message with quoted-printable line-breaks in author and subject" +add_email_corpus_control_char_subject +notmuch search "*" > OUTPUT +cat <EXPECTED +thread:0000000000000001 2009-11-17 [1/1] Two line? author; [notmuch] two line? subject headers (inbox unread) +EOF +test_expect_equal_file OUTPUT EXPECTED + test_done diff --git a/test/test-lib.sh b/test/test-lib.sh index eaf5051..0990d91 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -417,6 +417,18 @@ add_email_corpus () fi } +add_email_corpus_control_char_subject () +{ + rm -rf ${MAIL_DIR} + if [ -d ../corpus.ccs.mail ]; then + cp -a ../corpus.ccs.mail ${MAIL_DIR} + else + cp -a ../corpus.ccs ${MAIL_DIR} + notmuch new >/dev/null + cp -a ${MAIL_DIR} ../corpus.ccs.mail + fi +} + test_begin_subtest () { if [ -n "$inside_subtest" ]; then -- 1.7.5.1