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 8F8016DE1373 for ; Thu, 12 Dec 2019 15:36:37 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (1024-bit key; secure) header.d=kth.se header.i=@kth.se header.b="AqTTbQAS"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.695 X-Spam-Level: X-Spam-Status: No, score=-2.695 tagged_above=-999 required=5 tests=[AWL=-0.193, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 giXmJVoO8jBh for ; Thu, 12 Dec 2019 15:36:35 -0800 (PST) Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by arlo.cworth.org (Postfix) with ESMTPS id D68BF6DE138B for ; Thu, 12 Dec 2019 15:36:34 -0800 (PST) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id 5C98BA3EC for ; Fri, 13 Dec 2019 00:36:33 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wLGqA1je2gT4; Fri, 13 Dec 2019 00:36:32 +0100 (CET) X-KTH-Auth: ekeberg [85.229.200.172] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1576193792; bh=PhsDTinz8/zR0QQqqZbuhZY1Y0kPNQ9auTMlogt+O6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AqTTbQAS3sXYxLFtaO+t7jjQxFgymDH7FYBuuGMk93bvS3Abh+pnmwBzjmt4Hs1ZB Kop60ybEkXO63qoQ0VdRwbGZ/Pnrn+mHwrV7UON9tSTSdZBSF+ch+vvuwNrP7PsL8R CrWQI/T9fHCf+3bXOqqSshcPN9SiSSNQpQw60Wjo= X-KTH-mail-from: ekeberg@kth.se Received: from swing.localdomain (c-acc8e555.09-723-73746f39.bbcust.telenor.se [85.229.200.172]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id 960E3A3CB; Fri, 13 Dec 2019 00:36:32 +0100 (CET) From: ekeberg@kth.se To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test: extend test of attachment warnings Date: Fri, 13 Dec 2019 00:35:36 +0100 Message-Id: <20191212233536.7786-3-ekeberg@kth.se> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191212233536.7786-1-ekeberg@kth.se> References: <87bm0cc19l.fsf@swing.csc.kth.se> <20191212233536.7786-1-ekeberg@kth.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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, 12 Dec 2019 23:36:37 -0000 From: Örjan Ekeberg Check that attachment warnings are not raised when the word "attach" only occurs in a forwarded message. --- test/emacs-attachment-warnings.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/emacs-attachment-warnings.el b/test/emacs-attachment-warnings.el index 200ca7ba..a3067b14 100644 --- a/test/emacs-attachment-warnings.el +++ b/test/emacs-attachment-warnings.el @@ -36,6 +36,12 @@ Return `t' if the message would be sent, otherwise `nil'" ;; fontification properties. For fontification to happen we need to ;; allow some time for redisplay. (sit-for 0.01))) + (t . (lambda () + ;; "attach" is only mentioned in a forwarded message. + (insert "Hello\n") + (insert "<#mml type=message/rfc822 disposition=inline>\n") + (insert "X-Has-Attach:\n") + (insert "<#/mml>\n"))) ;; These should not be okay: (nil . (lambda () (insert "Here is an attachment:\n"))) @@ -49,6 +55,12 @@ Return `t' if the message would be sent, otherwise `nil'" ;; looking at fontification properties. For fontification ;; to happen we need to allow some time for redisplay. (sit-for 0.01))) + (nil . (lambda () + ;; "attachment" is mentioned before a forwarded message. + (insert "I also attach something.\n") + (insert "<#mml type=message/rfc822 disposition=inline>\n") + (insert "X-Has-Attach:\n") + (insert "<#/mml>\n"))) )) (defun notmuch-test-attachment-warning-1 () -- 2.24.0