add a test for repl on a ASCII only system
[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 require_locale en_US.utf-8 en_US.utf8
11 LC_ALL=en_US.UTF-8
12 export LC_ALL
13 unset MM_CHARSET
14
15 # create message to reply to
16
17 msgfile=`mhpath b +inbox`
18 cat >"$msgfile" <<EOF
19 From: =?UTF-8?Q?J=C3=BCrgen?= <juergen@example.net>
20 To: bob@example.com
21 Cc: =?UTF-8?Q?K=C3=A4the?= <kaethe@example.org>
22 Subject: repl addr decode
23 Date: Mon, 18 Apr 2016 08:36:14 +0200
24 MIME-Version: 1.0
25 Content-Type: text/plain; charset="us-ascii"
26 Message-ID: <1as2n8-1Q9-00@deseo.home.schnalke.org>
27
28 foo
29 EOF
30
31
32 # create the reply draft
33 runandcheck 'repl -nocc all -whatnow true l +inbox' <<!
34 !
35
36 # check the draft
37 runandcheck 'cat `mhpath +drafts l`' <<!
38 To: Jürgen <juergen@example.net>
39 Cc: 
40 Fcc: +sent
41 Subject: Re: repl addr decode
42 In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org>
43 References: <1as2n8-1Q9-00@deseo.home.schnalke.org>
44 Comments: In-reply-to Jürgen <juergen@example.net>
45    message dated "Mon, 18 Apr 2016 08:36:14 +0200."
46 --------
47 [2016-04-18 08:36] Jürgen <juergen@example.net>
48 >
49 > part       text/plain                   4
50 > foo
51 !
52
53
54
55 # create the group reply draft
56 runandcheck 'repl -group -nocc me -whatnow true l +inbox' <<!
57 !
58
59 # check the draft
60 runandcheck 'cat `mhpath +drafts l`' <<!
61 To: Jürgen <juergen@example.net>
62 Cc: bob@example.com, Käthe <kaethe@example.org>
63 Fcc: +sent
64 Subject: Re: repl addr decode
65 In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org>
66 References: <1as2n8-1Q9-00@deseo.home.schnalke.org>
67 Comments: In-reply-to Jürgen <juergen@example.net>
68    message dated "Mon, 18 Apr 2016 08:36:14 +0200."
69 --------
70 [2016-04-18 08:36] Jürgen <juergen@example.net>
71 >
72 > part       text/plain                   4
73 > foo
74 !
75
76 LC_ALL=C
77 export LC_ALL
78
79 # create the group reply draft
80 runandcheck 'repl -group -nocc me -whatnow true l +inbox' <<!
81 !
82
83 # check the draft
84 runandcheck 'cat `mhpath +drafts l`' <<!
85 To: J?rgen <juergen@example.net>
86 Cc: bob@example.com, K?the <kaethe@example.org>
87 Fcc: +sent
88 Subject: Re: repl addr decode
89 In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org>
90 References: <1as2n8-1Q9-00@deseo.home.schnalke.org>
91 Comments: In-reply-to J?rgen <juergen@example.net>
92    message dated "Mon, 18 Apr 2016 08:36:14 +0200."
93 --------
94 [2016-04-18 08:36] J?rgen <juergen@example.net>
95 >
96 > part       text/plain                   4
97 > foo
98 !