mhl and mhbuild ignore to long lines
[mmh] / test / tests / spost / test-group
1 # test spost: Group Addresses
2
3 . "$MH_TEST_COMMON"
4
5
6 draft="$MH_TEST_DIR/spost-$$.draft"
7
8 profile="$MMH/profile-spost"
9 cd "$MMH"
10 cat "`mhparam profile`" - >"$profile" <<!
11 default-from: Bob <bob@example.org>
12 !
13 cd - >/dev/null
14 export MMHP="$profile"
15
16
17
18 # Group Recipients
19
20 cat >"$draft" <<!
21 To: Undisclosed recipients: Alice <alice@example.org>,
22         Gill <gill@example.org>;
23 Date: Sun, 25 Oct 2015 18:59:56 +0100
24 Subject: Group Recipients
25 ----------------
26 foo
27 !
28
29 runandcheck 'spost -debug "$draft"' <<!
30 To: Undisclosed recipients: ;
31 Date: Sun, 25 Oct 2015 18:59:56 +0100
32 Subject: Group Recipients
33 From: Bob <bob@example.org>
34
35 foo
36 ----EOM----
37 alice@example.org
38 gill@example.org
39 !
40
41
42
43 cat >"$draft" <<!
44 To: charly@example.net
45 Cc: friends: alice@example.org, Gill <gill@example.org>;
46 Date: Sun, 25 Oct 2015 18:59:56 +0100
47 Subject: Group in CC
48 ----------------
49 foo
50 !
51
52 runandcheck 'spost -debug "$draft"' <<!
53 To: charly@example.net
54 Cc: friends: ;
55 Date: Sun, 25 Oct 2015 18:59:56 +0100
56 Subject: Group in CC
57 From: Bob <bob@example.org>
58
59 foo
60 ----EOM----
61 alice@example.org
62 gill@example.org
63 charly@example.net
64 !
65
66
67
68 cat >"$draft" <<!
69 To: charly@example.net
70 Cc: friends: alice@example.org, Gill <gill@example.org>
71 Date: Sun, 25 Oct 2015 18:59:56 +0100
72 Subject: No semicolon at the end of the group
73 ----------------
74 foo
75 !
76
77 runandcheck 'spost -debug "$draft"' <<!
78 To: charly@example.net
79 Cc: friends: ;
80 Date: Sun, 25 Oct 2015 18:59:56 +0100
81 Subject: No semicolon at the end of the group
82 From: Bob <bob@example.org>
83
84 foo
85 ----EOM----
86 alice@example.org
87 gill@example.org
88 charly@example.net
89 !
90
91
92
93 cat >"$draft" <<!
94 To: friends: Alice <alice@example.org>, Gill <gill@example.org>;,
95         charly@example.net
96 Date: Sun, 25 Oct 2015 18:59:56 +0100
97 Subject: Group plus address with comma
98 ----------------
99 foo
100 !
101
102 runandcheck 'spost -debug "$draft"' <<!
103 To: friends: ;, charly@example.net
104 Date: Sun, 25 Oct 2015 18:59:56 +0100
105 Subject: Group plus address with comma
106 From: Bob <bob@example.org>
107
108 foo
109 ----EOM----
110 alice@example.org
111 gill@example.org
112 charly@example.net
113 !
114
115
116
117 cat >"$draft" <<!
118 To: friends: Alice <alice@example.org>, Gill <gill@example.org>;
119         charly@example.net
120 Date: Sun, 25 Oct 2015 18:59:56 +0100
121 Subject: Group plus address, no comma
122 ----------------
123 foo
124 !
125
126 runandcheck 'spost -debug "$draft"' <<!
127 To: friends: ;, charly@example.net
128 Date: Sun, 25 Oct 2015 18:59:56 +0100
129 Subject: Group plus address, no comma
130 From: Bob <bob@example.org>
131
132 foo
133 ----EOM----
134 alice@example.org
135 gill@example.org
136 charly@example.net
137 !
138
139
140
141 cat >"$draft" <<!
142 To: abc:alice
143 Date: Sun, 25 Oct 2015 18:59:56 +0100
144 Subject: One word with a colon inside
145 ----------------
146 foo
147 !
148
149 runandcheck 'spost -debug "$draft"' <<!
150 To: abc: ;
151 Date: Sun, 25 Oct 2015 18:59:56 +0100
152 Subject: One word with a colon inside
153 From: Bob <bob@example.org>
154
155 foo
156 ----EOM----
157 alice
158 !
159
160
161
162 cat >"$draft" <<!
163 To: charly
164 Dcc: friends: Alice <alice@example.org>, Gill <gill@example.org>;
165 Date: Sun, 25 Oct 2015 18:59:56 +0100
166 Subject: Group in Dcc
167 ----------------
168 foo
169 !
170
171 runandcheck 'spost -debug "$draft"' <<!
172 To: charly
173 Date: Sun, 25 Oct 2015 18:59:56 +0100
174 Subject: Group in Dcc
175 From: Bob <bob@example.org>
176
177 foo
178 ----EOM----
179 alice@example.org
180 gill@example.org
181 charly
182 !