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 39C3D6DE01E0 for ; Tue, 25 Sep 2018 08:09:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.402 X-Spam-Level: X-Spam-Status: No, score=0.402 tagged_above=-999 required=5 tests=[AWL=-0.251, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=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 SuxDWlO3OUJV for ; Tue, 25 Sep 2018 08:09:18 -0700 (PDT) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by arlo.cworth.org (Postfix) with ESMTPS id 54A7D6DE023F for ; Tue, 25 Sep 2018 08:09:17 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id m16so7273531wrx.12 for ; Tue, 25 Sep 2018 08:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=pI0YdloumcVTC9xnx16i11pqllo8ojMYW4JR93mg0ig=; b=Y7q9Bmlu7C6cW/MoBd9y6j/yh/hpc8ScOdOkqPz5MhO4hPx0++aEZXAytu0pEgU56r L88VI+kf0peRdUTR90XeR6E+Gk9D0VgnaCL+9XyUb329Pdl0V1cEc5zwNzVHKSivFnL2 YDSuSpTzJG/EUO5VaDY5Tk93TKCNz4NR/ZnN/mtb6Xi6VGJ9gLE50gq8jeM8vQW1Vj6f HjMkplXEFjARKzER5c7LwKZ8ZskzJyyBJjBPhYhSRt+AM7mJBlkXVj0ItzxjGZrPDKG4 2iSYunoiZTcg5N7dJiTUbaHJfcGtYg5ffv3tLZwL3tbWuFweNFR7oVWVycN3UG9b21Sl 1jgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pI0YdloumcVTC9xnx16i11pqllo8ojMYW4JR93mg0ig=; b=GtNW8QjUs/Nm/ynikyF7VG52zI+dkHGtcPmS5WW+xrKRMYswhX3skAmmXgWENkaxRz VWiHGyQKe0TsCRnR5L1Jkq/ncQABp0X8yri+4Z6SjvdR293IJrHQY7+LyxqS7ydG8Wfc 1XyqAP3sllPNgVpAT9OBdLgFYB2/j2c6+r5Gl2JlCkQryFfYtkBXjuUIx3Rmf95TIVsv vYLkpvRG8cenMcPMyFo2lR6JfmeouT8uCS+NVoGMImQuEVSdP7R7I2fMdSQ2S9aJQXbu Hi1XJe1tp2C2Jc9pk3wMT4Ro3MsTzBxPVcn4t+vciMov8UMiI9ynO6UrDdvbpJnVNZc/ aE9g== X-Gm-Message-State: ABuFfojGCMNfSHUlrckgAQ1MsnD6N/yMfZ8Ghn7YahrhPvBYPoHagpEZ AWiWBgyFnxxuLBWKMOsBDQb94LsHIL3chA== X-Google-Smtp-Source: ACcGV611WoTWzl8h8Q6MGrKp6UDm2knN4khIAKXaZdjN8HjwS0StxZoqm5okwQuH08ZDUD/tonRxyA== X-Received: by 2002:adf:c109:: with SMTP id r9-v6mr1401317wre.233.1537888153987; Tue, 25 Sep 2018 08:09:13 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id x204-v6sm2444858wmg.27.2018.09.25.08.09.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 08:09:13 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 06033819 for ; Tue, 25 Sep 2018 15:09:11 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v1 1/2] test: Check that `notmuch-mua-send-hook' is called on sending a message Date: Tue, 25 Sep 2018 16:09:09 +0100 Message-Id: <20180925150910.22318-2-dme@dme.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180925150910.22318-1-dme@dme.org> References: <20180925150910.22318-1-dme@dme.org> 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.26 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: Tue, 25 Sep 2018 15:09:19 -0000 --- test/T310-emacs.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 9bf68b48..d743abb7 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -1106,4 +1106,30 @@ output=$(test_emacs "(mapcar 'notmuch-escape-boolean-term (list \"\\x201cxyz\\x201d\"))") test_expect_equal "$output" '("\"\"" "abc`~!@#$%^&*-=_+123" "\"(abc\"" "\")abc\"" "\"\"\"abc\"" "\"'$'\x01''xyz\"" "\"“xyz”\"")' +test_begin_subtest "Sending a message calls the send message hooks" +test_subtest_known_broken +emacs_deliver_message \ + 'Testing message sending hooks' \ + 'This is a test of the message sending hooks.' \ + "(message-goto-to) + (kill-whole-line) + (insert \"To: user@example.com\n\") + (add-hook 'notmuch-mua-send-hook (lambda () (goto-char (point-max)) (insert \"\nThis text added by the hook.\")))" +sed \ + -e s',^Message-ID: <.*>$,Message-ID: ,' \ + -e s',^\(Content-Type: text/plain\); charset=us-ascii$,\1,' < sent_message >OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: user@example.com +Subject: Testing message sending hooks +Date: 01 Jan 2000 12:00:00 -0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain + +This is a test of the message sending hooks. +This text added by the hook. +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done -- 2.19.0