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