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 B4D0E6DE1300 for ; Mon, 8 Apr 2019 07:22:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.308 X-Spam-Level: X-Spam-Status: No, score=0.308 tagged_above=-999 required=5 tests=[AWL=-0.345, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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 5TfGb6H7egxQ for ; Mon, 8 Apr 2019 07:22:00 -0700 (PDT) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by arlo.cworth.org (Postfix) with ESMTPS id AA1366DE12EB for ; Mon, 8 Apr 2019 07:21:59 -0700 (PDT) Received: by mail-wr1-f66.google.com with SMTP id q1so16677588wrp.0 for ; Mon, 08 Apr 2019 07:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:subject:in-reply-to:references:from:date:message-id:mime-version :content-transfer-encoding; bh=QcXVwQ21vzMK7ZTktqD60GJjAFcQpADOU/6klOrmyX4=; b=hHF379JRUhQpf+tkYqRMM1fNJNixR2ar4NbVrIqZdLyO9hi+f1DnmqMER34tI1pelj Ay26d8omDD1wegYkScP3+o2F21W5Gd/iKikKIL/8S+0FDM0B1rOdvfvpwSxP8fcaZTFB Ymvqn4eGFZ1wGLG2upxIemS79nTEy4Zrgav8NMMhtX173hWLKxw2gLOdMACMGA3NcHf4 TDGk9ZU4wc2t1X9bMPq8pNSCMYpcKwzA9X4oHntXPoR7KTN/4p5A8WV9s9KbYglK1vw9 MmlNbe0zbpulbAIk/f+PW31sGqhgSr7eNb11V4WflH9J7BhluKhJVyUq/6NLRArdG/SH FAaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:in-reply-to:references:from:date :message-id:mime-version:content-transfer-encoding; bh=QcXVwQ21vzMK7ZTktqD60GJjAFcQpADOU/6klOrmyX4=; b=KtNiQwdxIID3jyzw55eB6D7CYho9xxRcxz8NQEpI5wk6leN7dXHNgkyj6BXI7Ra6Rl kl5xW+TcCjNQqBa4qoW9z0HTv2ANs7B4GlQUEHXd3OEy5yRXqXiaYfWZfGPWuwabHbcO dTJr83nRhNajTOfW8gMb5IK1ll9pftRpgtqU7WXNHY2UaCJwovxwjUmDEfJWh9HZzPB9 vHjLkoesUY6W1DBGpBeMy0VmIOK084g5AAHzgjXqLrKR7uZtwYfx/SzNWZVUuPwC1lO6 x6cN9KiWZWclYaxoiJhGUE/g/RucAnS5JC4Iy/GJ7tYXjdSVl1EncSxgSCoHTi0ms0OV AUrQ== X-Gm-Message-State: APjAAAXhtzyh6Mx89Y5fiz8SZ4IjpU6vwx2aDn1pnOALoUOJJmEu8RwC 8LdppArLzHTsNKmuLjxOHr8UvA== X-Google-Smtp-Source: APXvYqxDMnYc558qS9MU+AOSuih5jhCwMuQ0ltV9QAk/fIkwSYC6pE94tTJmLjK9+DZ3ynYr+mpBIA== X-Received: by 2002:adf:b6a4:: with SMTP id j36mr18345597wre.55.1554733316473; Mon, 08 Apr 2019 07:21:56 -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 g8sm47877341wro.77.2019.04.08.07.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 07:21:54 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id a0fa7929; Mon, 8 Apr 2019 14:21:54 +0000 (UTC) To: =?utf-8?Q?=C3=96rjan?= Ekeberg , notmuch@notmuchmail.org Subject: Re: [PATCH v2 4/4] test: add test for checking forwarded messages In-Reply-To: <20190404230126.4283-5-ekeberg@kth.se> References: <20190404230126.4283-1-ekeberg@kth.se> <20190404230126.4283-5-ekeberg@kth.se> X-HGTTG: heart-of-gold From: David Edmondson Date: Mon, 08 Apr 2019 15:21:53 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 08 Apr 2019 14:22:00 -0000 On Friday, 2019-04-05 at 01:01:26 +02, =C3=96rjan Ekeberg wrote: > Add test of forwarding messages from within emacs. > The first test checks that a references header is properly > added to the new message. The second test checks that the > send-hook of the forwarding message adds a forwarded-tag > to the original message. > --- > test/T730-emacs-forwarding.sh | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100755 test/T730-emacs-forwarding.sh > > diff --git a/test/T730-emacs-forwarding.sh b/test/T730-emacs-forwarding.sh > new file mode 100755 > index 00000000..0bdd197f > --- /dev/null > +++ b/test/T730-emacs-forwarding.sh > @@ -0,0 +1,35 @@ > +#!/usr/bin/env bash > + > +test_description=3D"emacs forwarding" > +. $(dirname "$0")/test-lib.sh || exit 1 > + > +test_begin_subtest "Forward setting the correct references header" > +message_id=3D'OriginalMessage@notmuchmail.org' > +add_message \ > + [id]=3D"$message_id" \ > + '[from]=3D"user@example.com"' \ > + '[subject]=3D"This is the original message"' \ > + '[body]=3D"-----Original Message----- > +Text here."' > + > +test_emacs "(let ((message-hidden-headers ()) > + (notmuch-fcc-dirs ())) This is non-idiomatic. We would normally write: (let (message-hidden-headers notmuch-fcc-dirs) ...) That is, they are bound to nil by default. =20 > + (notmuch-show \"id:$message_id\") > + (notmuch-show-forward-message) > + (run-hooks 'notmuch-mua-send-hook) > + (message-narrow-to-headers) > + (test-visible-output)) > + (run-hooks 'notmuch-mua-send-hook)" > + > +cat <EXPECTED > +From: Notmuch Test Suite > +To:=20 > +Subject: [user@example.com] This is the original message > +References: <$message_id> > +EOF > +test_expect_equal_file EXPECTED OUTPUT > + > +test_begin_subtest "Forwarding adding the forwarded tag" > +test_expect_equal $(notmuch search --output=3Dmessages tag:forwarded) id= :$message_id > + > +test_done > --=20 > 2.20.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch dme. --=20 You can't hide from the flipside.