unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob d1a573fb4690c8fe475e8afe2954ebbb3ca3ffe4 991 bytes (raw)
name: test/T730-emacs-forwarding.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
#!/usr/bin/env bash

test_description="emacs forwarding"
. $(dirname "$0")/test-lib.sh || exit 1

test_begin_subtest "Forward setting the correct references header"
# Check that, when forwarding a message, the new message has
# a References-header pointing to the original (forwarded) message.

message_id='OriginalMessage@notmuchmail.org'
add_message \
    [id]="$message_id" \
    '[from]="user@example.com"' \
    '[subject]="This is the original message"' \
    '[body]="Dummy text."'

test_emacs_expect_t "
   (progn
    (notmuch-show \"id:$message_id\")
    (notmuch-show-forward-message)
    (run-hooks 'notmuch-mua-send-hook)
    (notmuch-test-expect-equal (message-field-value \"References\")
                               \"<$message_id>\"))"

test_begin_subtest "Forwarding adding the forwarded tag"
# Check that the send hook called in the previous subtest did add the forwarded-tag

test_expect_equal $(notmuch search --output=messages tag:forwarded) id:$message_id

test_done

debug log:

solving d1a573fb ...
found d1a573fb in https://yhetil.org/notmuch/20190410121908.5998-2-ekeberg@kth.se/

applying [1/1] https://yhetil.org/notmuch/20190410121908.5998-2-ekeberg@kth.se/
diff --git a/test/T730-emacs-forwarding.sh b/test/T730-emacs-forwarding.sh
new file mode 100755
index 00000000..d1a573fb

Checking patch test/T730-emacs-forwarding.sh...
Applied patch test/T730-emacs-forwarding.sh cleanly.

index at:
100755 d1a573fb4690c8fe475e8afe2954ebbb3ca3ffe4	test/T730-emacs-forwarding.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).