145957c0003f60e72e827e51f4c6ff833809f8f4
[mmh] / test / tests / repl / test-decode-addr
1 #!/bin/sh
2 ######################################################
3 #
4 # Test that repl and repl -g decode recipient addrs
5 #
6 ######################################################
7
8 . "$MH_TEST_COMMON"
9
10
11 # create message to reply to
12
13 msgfile=`mhpath b +inbox`
14 cat >"$msgfile" <<EOF
15 From: =?UTF-8?Q?J=C3=BCrgen?= <juergen@example.net>
16 To: bob@example.com
17 Cc: =?UTF-8?Q?K=C3=A4the?= <kaethe@example.org>
18 Subject: repl addr decode
19 Date: Mon, 18 Apr 2016 08:36:14 +0200
20 MIME-Version: 1.0
21 Content-Type: text/plain; charset="us-ascii"
22 Message-ID: <1as2n8-1Q9-00@deseo.home.schnalke.org>
23
24 foo
25 EOF
26
27
28 # create the reply draft
29 runandcheck 'repl -nocc all -whatnow true l +inbox' <<!
30 !
31
32 # check the draft
33 runandcheck 'cat `mhpath +drafts l`' <<!
34 To: Jürgen <juergen@example.net>
35 Cc: 
36 Fcc: +sent
37 Subject: Re: repl addr decode
38 In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org>
39 References: <1as2n8-1Q9-00@deseo.home.schnalke.org>
40 Comments: In-reply-to Jürgen <juergen@example.net>
41    message dated "Mon, 18 Apr 2016 08:36:14 +0200."
42 --------
43 [2016-04-18 08:36] Jürgen <juergen@example.net>
44 >
45 > part       text/plain                   4
46 > foo
47 !
48
49
50
51 # create the group reply draft
52 runandcheck 'repl -group -nocc me -whatnow true l +inbox' <<!
53 !
54
55 # check the draft
56 runandcheck 'cat `mhpath +drafts l`' <<!
57 To: Jürgen <juergen@example.net>
58 Cc: bob@example.com, Käthe <kaethe@example.org>
59 Fcc: +sent
60 Subject: Re: repl addr decode
61 In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org>
62 References: <1as2n8-1Q9-00@deseo.home.schnalke.org>
63 Comments: In-reply-to Jürgen <juergen@example.net>
64    message dated "Mon, 18 Apr 2016 08:36:14 +0200."
65 --------
66 [2016-04-18 08:36] Jürgen <juergen@example.net>
67 >
68 > part       text/plain                   4
69 > foo
70 !
71