From: Jani Nikula Date: Fri, 11 May 2012 14:32:23 +0000 (+0300) Subject: [PATCH 2/2] test: add tests for notmuch reply From guessing X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8deb25c82a6205cb509a8a3e242ec8b4525519a3;p=notmuch-archives.git [PATCH 2/2] test: add tests for notmuch reply From guessing --- diff --git a/ac/b463fcb1b37e1bd6d1ef8264911ebb6a8cc0e4 b/ac/b463fcb1b37e1bd6d1ef8264911ebb6a8cc0e4 new file mode 100644 index 000000000..0f4c8b92d --- /dev/null +++ b/ac/b463fcb1b37e1bd6d1ef8264911ebb6a8cc0e4 @@ -0,0 +1,147 @@ +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 C906A431FBF + for ; Fri, 11 May 2012 07:32:34 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 N6f9zUSHyr7X for ; + Fri, 11 May 2012 07:32:33 -0700 (PDT) +Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E89C4431FB6 + for ; Fri, 11 May 2012 07:32:32 -0700 (PDT) +Received: by mail-lpp01m010-f53.google.com with SMTP id u2so2102841lag.26 + for ; Fri, 11 May 2012 07:32:32 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references + :in-reply-to:references:x-gm-message-state; + bh=qC5c/NItUFBzSL/nL+wBx2Me/81jeJ7NiqJEvoNTnxU=; + b=ARprC1zK77cHqMPE2I2NJJq1wxBbYeRzQ2CA7oSgXvYQFFPP68TvRJIcYo1RZNQiYr + AO8Y/lPEBnRjnkg5kIS/G1y9+yAsBpFgh9Qz/HNqaHQUSot1r+qxPAjKBM6QCBJr1eYS + SlR2CYEauZGlKHcmUPc0qhqjK42ODMb2AeXZCrGE50PscIEVIiHhotxGxfnJE4020ksn + YyKWejcTKUM6JYPHh+Touq4TkdMM2An6VA86ELJgcH9daY0BV37+73wESwtrZVYXVKqj + kmqjzdc01LAkit1sRdUa2rGLaZw1Zwy6ucCSBD/1wnIRDqoFP73qfvBCYmmfS05b4k9E + T58w== +Received: by 10.152.105.173 with SMTP id gn13mr8560050lab.20.1336746752440; + Fri, 11 May 2012 07:32:32 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi. + [80.220.80.68]) + by mx.google.com with ESMTPS id k3sm11985973lbz.4.2012.05.11.07.32.30 + (version=SSLv3 cipher=OTHER); Fri, 11 May 2012 07:32:31 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 2/2] test: add tests for notmuch reply From guessing +Date: Fri, 11 May 2012 17:32:23 +0300 +Message-Id: + +X-Mailer: git-send-email 1.7.9.5 +In-Reply-To: + <21a946917c5c8dd63295b7c87b7c2d1ebcb6e71e.1336746160.git.jani@nikula.org> +References: + <21a946917c5c8dd63295b7c87b7c2d1ebcb6e71e.1336746160.git.jani@nikula.org> +In-Reply-To: + <21a946917c5c8dd63295b7c87b7c2d1ebcb6e71e.1336746160.git.jani@nikula.org> +References: + <21a946917c5c8dd63295b7c87b7c2d1ebcb6e71e.1336746160.git.jani@nikula.org> +X-Gm-Message-State: + ALoCoQntfuiIIVCvxSoMoKdOZ8W3EmS560WVu+Nn2qX4ApYSqTz47euk04b7CC7pySsWIzD657Fx +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, 11 May 2012 14:32:35 -0000 + +Add tests for picking up user's From address from fallback headers +Envelope-To, X-Original-To, and Delivered-To. + +Signed-off-by: Jani Nikula +--- + test/reply | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) + +diff --git a/test/reply b/test/reply +index 00f4bea..ee5d361 100755 +--- a/test/reply ++++ b/test/reply +@@ -138,4 +138,59 @@ References: <${gen_msg_id}> + + On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: + > 200-byte header" ++ ++test_begin_subtest "From guessing: Envelope-To" ++add_message '[from]="Sender "' \ ++ '[to]="Recipient "' \ ++ '[subject]="From guessing"' \ ++ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ ++ '[body]="From guessing"' \ ++ '[header]="Envelope-To: test_suite_other@notmuchmail.org"' ++ ++output=$(notmuch reply id:${gen_msg_id}) ++test_expect_equal "$output" "From: Notmuch Test Suite ++Subject: Re: From guessing ++To: Sender , Recipient ++In-Reply-To: <${gen_msg_id}> ++References: <${gen_msg_id}> ++ ++On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: ++> From guessing" ++ ++test_begin_subtest "From guessing: X-Original-To" ++add_message '[from]="Sender "' \ ++ '[to]="Recipient "' \ ++ '[subject]="From guessing"' \ ++ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ ++ '[body]="From guessing"' \ ++ '[header]="X-Original-To: test_suite@otherdomain.org"' ++ ++output=$(notmuch reply id:${gen_msg_id}) ++test_expect_equal "$output" "From: Notmuch Test Suite ++Subject: Re: From guessing ++To: Sender , Recipient ++In-Reply-To: <${gen_msg_id}> ++References: <${gen_msg_id}> ++ ++On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: ++> From guessing" ++ ++test_begin_subtest "From guessing: Delivered-To" ++add_message '[from]="Sender "' \ ++ '[to]="Recipient "' \ ++ '[subject]="From guessing"' \ ++ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ ++ '[body]="From guessing"' \ ++ '[header]="Delivered-To: test_suite_other@notmuchmail.org"' ++ ++output=$(notmuch reply id:${gen_msg_id}) ++test_expect_equal "$output" "From: Notmuch Test Suite ++Subject: Re: From guessing ++To: Sender , Recipient ++In-Reply-To: <${gen_msg_id}> ++References: <${gen_msg_id}> ++ ++On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: ++> From guessing" ++ + test_done +-- +1.7.9.5 +