unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 695f929afb8f2b0a5f215262f713b597b19da1f7 2684 bytes (raw)
name: test/emacs-show 	 # 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
#!/usr/bin/env bash

test_description="emacs notmuch-show view"
. test-lib.sh

test_begin_subtest "Hiding Original Message region at beginning of a message"
message_id='OriginalMessageHiding.1@notmuchmail.org'
add_message \
    [id]="$message_id" \
    '[subject]="Hiding Original Message region at beginning of a message"' \
    '[body]="-----Original Message-----
Text here."'

cat <<EOF >EXPECTED
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: Hiding Original Message region at beginning of a message
To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000

[ 2-line hidden original message. Click/Enter to show. ]
EOF

test_emacs "(notmuch-show \"id:$message_id\")
	    (test-visible-output)"
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "Bare subject #1"
output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
test_expect_equal "$output" '"subject"'

test_begin_subtest "Bare subject #2"
output=$(test_emacs '(notmuch-show-strip-re "re:Re: re:  Re:  re:subject")')
test_expect_equal "$output" '"subject"'

test_begin_subtest "Bare subject #3"
output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
test_expect_equal "$output" '"the cure: fix the regexp"'

test_begin_subtest "Toggle display multipart/alternative"
cat <<EOF > ${MAIL_DIR}/embedded_message
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Subject: html message
Date: Fri, 05 Jan 2001 15:42:57 +0000
User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)
Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="==-=-=="

--==-=-==
Content-Type: text/html

<p>This is the text/html part of a multipart/alternative.</p>

--==-=-==
Content-Type: text/plain

This is the text/plain part of a multipart/alternative.

--==-=-==--
EOF
notmuch new > /dev/null
test_emacs "(let ((notmuch-show-all-multipart/alternative-parts nil))
              (notmuch-show \"id:87liy5ap01.fsf@yoom.home.cworth.org\")
	      (test-output))"
mv OUTPUT{,.text}
test_emacs "(let ((notmuch-show-all-multipart/alternative-parts nil))
              (notmuch-show \"id:87liy5ap01.fsf@yoom.home.cworth.org\")
              (notmuch-show-cycle-message-multipart)
	      (test-output))"
mv OUTPUT{,.html}
diff OUTPUT.{text,html} >OUTPUT.diff
cat <<EOF >EXPECTED.diff
7,9c7,10
< [ text/html (not shown) ]
< [ text/plain ]
< This is the text/plain part of a multipart/alternative.
---
> [ text/html ]
> This is the text/html part of a multipart/alternative.
> 
> [ text/plain (not shown) ]
EOF
test_expect_equal_file {OUTPUT,EXPECTED}.diff

test_done

debug log:

solving 695f929 ...
found 695f929 in https://yhetil.org/notmuch/1344793168-23555-1-git-send-email-jrollins@finestructure.net/
found e9a714f in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 e9a714fa228720901a90b3b83d60fd33c9be6095	test/emacs-show

applying [1/1] https://yhetil.org/notmuch/1344793168-23555-1-git-send-email-jrollins@finestructure.net/
diff --git a/test/emacs-show b/test/emacs-show
index e9a714f..695f929 100755

1:51: trailing whitespace.
> 
Checking patch test/emacs-show...
Applied patch test/emacs-show cleanly.
warning: 1 line adds whitespace errors.

index at:
100755 695f929afb8f2b0a5f215262f713b597b19da1f7	test/emacs-show

(*) 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).