From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A9ADD429E27 for ; Wed, 23 May 2012 22:16:12 -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 Pha3N6L-Knpv for ; Wed, 23 May 2012 22:16:10 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7C50A431E82 for ; Wed, 23 May 2012 22:16:01 -0700 (PDT) Received: by lbbgk8 with SMTP id gk8so6556131lbb.26 for ; Wed, 23 May 2012 22:15:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to: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=UKfg1S6cd/mI8h6baFpw5MtUEkkae27SiXwqjwSyZObZ2Ogj1hTkgA50jSaYTwG1Z6 UZhFmAAtXq687h7JryBS/zOTtJK3IYah6qfItEwaSR2cWpNHeNhW7ApZT9s385e4K49G p4k1i9EkCgKarYuYGer5U02CZZdo5hihQUH5+oaIwG76RFSR6Ab5vw3EJeRiEozFtnTl 22OfC3wMYH7juzoqGkdiRC2ItEyxbV1HjxOmUGJGrY2s8j4u9cFBC0VjvfuoKdil+KFh Sx5hmpfTjF7yv2ieMd1shcM+qTBw4fwgpSVecX803lMWCxdCCJHDx+jN/KzTz6r484he ILnw== Received: by 10.112.103.8 with SMTP id fs8mr13333057lbb.29.1337836559724; Wed, 23 May 2012 22:15:59 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi. [80.220.80.68]) by mx.google.com with ESMTPS id o5sm588971lbg.5.2012.05.23.22.15.58 (version=SSLv3 cipher=OTHER); Wed, 23 May 2012 22:15:59 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v2 2/2] test: add tests for notmuch reply From guessing Date: Thu, 24 May 2012 08:15:50 +0300 Message-Id: <1d41cf37d4d2d94aa0a0101591e9bdba9cafe976.1337836150.git.jani@nikula.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmQmEVN+zru1v80OQWtYbTDwkGWg1/z8RM8ZCqDxveel5sXygopTn/H3FUbBUvj5vRcrlBT 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: Thu, 24 May 2012 05:16:13 -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