unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 5593ae5ded1ddb2266c4b88147bb7355fd61a807 1320 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
#!/usr/bin/env bash

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

test_require_emacs

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 "
  (let ((message-send-mail-function (lambda () t)))
    (notmuch-show \"id:$message_id\")
    (notmuch-show-forward-message)
    (save-restriction
      (message-narrow-to-headers)
      (message-remove-header \"Fcc\")
      (message-remove-header \"To\")
      (message-add-header \"To: nobody@example.com\"))

    (notmuch-mua-send)
    (notmuch-test-expect-equal
        (message-field-value \"References\") \"<$message_id>\"))
"

test_begin_subtest "Forwarding adding the forwarded tag"
# Check that sending the forwarding message in the previous
# subtest did add the forwarded-tag to the message that was forwarded.

test_expect_equal "$(notmuch search --output=tags id:$message_id | sort)" \
"forwarded
inbox
unread"

test_done

debug log:

solving 5593ae5d ...
found 5593ae5d in https://yhetil.org/notmuch/20210522152741.27213-1-tomi.ollila@iki.fi/ ||
	https://yhetil.org/notmuch/20210523073443.11618-1-tomi.ollila@iki.fi/
found 378067ed in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 378067edd5d6321148f17298dabe9b1c362c48f3	test/T730-emacs-forwarding.sh

applying [1/1] https://yhetil.org/notmuch/20210522152741.27213-1-tomi.ollila@iki.fi/
diff --git a/test/T730-emacs-forwarding.sh b/test/T730-emacs-forwarding.sh
index 378067ed..5593ae5d 100755

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

skipping https://yhetil.org/notmuch/20210523073443.11618-1-tomi.ollila@iki.fi/ for 5593ae5d
index at:
100755 5593ae5ded1ddb2266c4b88147bb7355fd61a807	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).