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