3 test_description="emacs forwarding"
4 . $(dirname "$0")/test-lib.sh || exit 1
5 . $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
9 test_begin_subtest "Forward setting the correct references header"
10 # Check that, when forwarding a message, the new message has
11 # a References-header pointing to the original (forwarded) message.
13 message_id='OriginalMessage@notmuchmail.org'
16 '[from]="user@example.com"' \
17 '[subject]="This is the original message"' \
18 '[body]="Dummy text."'
21 (let ((message-send-mail-function (lambda () t)))
22 (notmuch-show \"id:$message_id\")
23 (notmuch-show-forward-message)
25 (message-narrow-to-headers)
26 (message-remove-header \"Fcc\")
27 (message-remove-header \"To\")
28 (message-add-header \"To: nobody@example.com\"))
31 (notmuch-test-expect-equal
32 (message-field-value \"References\") \"<$message_id>\"))
35 test_begin_subtest "Forwarding adding the forwarded tag"
36 # Check that sending the forwarding message in the previous
37 # subtest did add the forwarded-tag to the message that was forwarded.
39 test_expect_equal "$(notmuch search --output=tags id:$message_id | sort)" \