Commit 548d50fb 548d50fb19cd66dbe153e4d7e879501bab58c0aa by Sergey Poznyakoff

Rewrite libmailutils testsuite in Autotest.

* configure.ac: Create libmailutils/tests/atlocal and
libmailutils/tests/Makefile. Remove libmailutils/testsuite.
* examples/Makefile.am (noinst_PROGRAMS): Remove programs moved
to libmailutils/tests.
* examples/argcv.c -> libmailutils/tests/argcv.c
* libmailutils/testsuite/Decode -> libmailutils/tests/Decode
* libmailutils/testsuite/Encode -> libmailutils/tests/Encode
* examples/decode2047.c: Move to libmailutils/tests
* examples/encode2047.c: Move to libmailutils/tests
* examples/mailcap.c: Likewise.
* examples/url-parse.c: Likewise.

* include/mailutils/Makefile.am: Minor changes.
* libmailutils/Makefile.am (SUBDIRS): Replace testsuite with tests.
* libmailutils/tests/Makefile.am: New file.
* libmailutils/tests/addr.c: New file.
* libmailutils/tests/address.at: New file.
* libmailutils/tests/argcv.at: New file.
* libmailutils/tests/atlocal.in: New file.
* libmailutils/tests/base64d.at: New file.
* libmailutils/tests/base64e.at: New file.
* libmailutils/tests/decode2047.at: New file.
* libmailutils/tests/encode2047.at: New file.
* libmailutils/tests/fltst.c: New file.
* libmailutils/tests/mailcap.at: New file.
* libmailutils/tests/mime.at: New file.
* libmailutils/tests/testsuite.at: New file.
* libmailutils/tests/url.at: New file.

* libmailutils/testsuite/: Delete.

* frm/tests/Makefile.am: Prefix package.m4 creation commands with $(AM_V_GEN).
* readmsg/tests/Makefile.am: Likewise.
* sieve/tests/Makefile.am: Likewise.
* frm/tests/testsuite.at: Minor changes.
* readmsg/tests/testsuite.at: Include testsuite.inc.
* sieve/tests/testsuite.at: Likewise.
* sieve/tests/version.at: Comment out inclusion of testsuite.inc.
* testsuite/testsuite.inc: Add m4_version_prereq.
1 parent 7b79a6ed
Showing 54 changed files with 2891 additions and 2743 deletions
...@@ -1211,7 +1211,9 @@ AC_ARG_WITH([mh-bindir], ...@@ -1211,7 +1211,9 @@ AC_ARG_WITH([mh-bindir],
1211 1211
1212 # Initialize the (autotest) test suite. 1212 # Initialize the (autotest) test suite.
1213 AC_CONFIG_TESTDIR(tests) 1213 AC_CONFIG_TESTDIR(tests)
1214 AC_CONFIG_FILES([frm/tests/Makefile 1214 AC_CONFIG_FILES([libmailutils/tests/Makefile
1215 libmailutils/tests/atlocal
1216 frm/tests/Makefile
1215 frm/tests/atlocal 1217 frm/tests/atlocal
1216 readmsg/tests/Makefile 1218 readmsg/tests/Makefile
1217 readmsg/tests/atlocal 1219 readmsg/tests/atlocal
...@@ -1362,7 +1364,6 @@ AC_CONFIG_FILES([ ...@@ -1362,7 +1364,6 @@ AC_CONFIG_FILES([
1362 mail/Makefile 1364 mail/Makefile
1363 mail/testsuite/Makefile 1365 mail/testsuite/Makefile
1364 libmailutils/Makefile 1366 libmailutils/Makefile
1365 libmailutils/testsuite/Makefile
1366 messages/Makefile 1367 messages/Makefile
1367 messages/testsuite/Makefile 1368 messages/testsuite/Makefile
1368 mh/Makefile 1369 mh/Makefile
......
...@@ -35,18 +35,13 @@ SUBDIRS = config $(CPP_DIR) python scheme ...@@ -35,18 +35,13 @@ SUBDIRS = config $(CPP_DIR) python scheme
35 noinst_PROGRAMS = \ 35 noinst_PROGRAMS = \
36 aclck\ 36 aclck\
37 addr\ 37 addr\
38 argcv\
39 base64\ 38 base64\
40 decode2047\
41 echosrv\ 39 echosrv\
42 encode2047\
43 header\ 40 header\
44 http\ 41 http\
45 iconv\ 42 iconv\
46 listop\ 43 listop\
47 lsf\ 44 lsf\
48 mailcap\
49 mimetest\
50 msg-send\ 45 msg-send\
51 mta\ 46 mta\
52 mucat\ 47 mucat\
...@@ -56,8 +51,7 @@ noinst_PROGRAMS = \ ...@@ -56,8 +51,7 @@ noinst_PROGRAMS = \
56 musocio\ 51 musocio\
57 $(NNTPCLIENT)\ 52 $(NNTPCLIENT)\
58 $(POP3CLIENT)\ 53 $(POP3CLIENT)\
59 sfrom\ 54 sfrom
60 url-parse
61 55
62 EXTRA_PROGRAMS = pop3client nntpclient 56 EXTRA_PROGRAMS = pop3client nntpclient
63 57
...@@ -79,15 +73,6 @@ numaddr_la_SOURCES = numaddr.c ...@@ -79,15 +73,6 @@ numaddr_la_SOURCES = numaddr.c
79 numaddr_la_LIBADD = ${MU_LIB_SIEVE} 73 numaddr_la_LIBADD = ${MU_LIB_SIEVE}
80 numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)' 74 numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
81 75
82 mimetest_LDADD =\
83 ../lib/libmuaux.la\
84 ${MU_LIB_MBOX}\
85 ${MU_LIB_IMAP}\
86 ${MU_LIB_POP}\
87 ${MU_LIB_AUTH}\
88 @MU_AUTHLIBS@\
89 ${MU_LIB_MAILUTILS}
90
91 msg_send_LDADD =\ 76 msg_send_LDADD =\
92 ../lib/libmuaux.la\ 77 ../lib/libmuaux.la\
93 ${MU_LIB_MAILER}\ 78 ${MU_LIB_MAILER}\
......
...@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) ...@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
23 ## ------------ ## 23 ## ------------ ##
24 24
25 $(srcdir)/package.m4: $(top_srcdir)/configure.ac 25 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
26 { \ 26 $(AM_V_GEN){ \
27 echo '# Signature of the current package.'; \ 27 echo '# Signature of the current package.'; \
28 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ 28 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
29 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ 29 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 # Require a reasonably recent autotest. 18 m4_include([testsuite.inc])
19 m4_version_prereq([2.52g])
20
21 m4_define([AT_SKIP_TEST],[exit 77])
22 19
23 dnl ------------------------------------------------------------ 20 dnl ------------------------------------------------------------
24 dnl FRM_MAILBOX -- mailbox used for testing 21 dnl FRM_MAILBOX -- mailbox used for testing
...@@ -47,8 +44,6 @@ AT_INIT ...@@ -47,8 +44,6 @@ AT_INIT
47 44
48 AT_TESTED([frm]) 45 AT_TESTED([frm])
49 46
50 m4_include([testsuite.inc])
51
52 MUT_VERSION(frm) 47 MUT_VERSION(frm)
53 48
54 FRMTEST([no options],[frm00], 49 FRMTEST([no options],[frm00],
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 20
21 BUILT_SOURCES=errno.h debug.h 21 BUILT_SOURCES=errno.h debug.h
22 EXTRA_DIST=errno.hin debug.hm4 types.hin 22 EXTRA_DIST=errno.hin debug.hm4 types.hin
23 errno.h: $(top_srcdir)/mailbox/errors errno.hin 23 errno.h: $(top_srcdir)/libmailutils/errors errno.hin
24 $(AM_V_GEN)$(AWK) -f $(mu_aux_dir)/generr.awk $^ > $@ 24 $(AM_V_GEN)$(AWK) -f $(mu_aux_dir)/generr.awk $^ > $@
25 25
26 debug.h: $(mu_aux_dir)/debugdef.m4 debug.hm4 26 debug.h: $(mu_aux_dir)/debugdef.m4 debug.hm4
......
...@@ -24,7 +24,7 @@ YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap ...@@ -24,7 +24,7 @@ YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
24 AM_YFLAGS=-vt 24 AM_YFLAGS=-vt
25 AM_LFLAGS=-dvp 25 AM_LFLAGS=-dvp
26 26
27 SUBDIRS = testsuite 27 SUBDIRS = tests
28 28
29 lib_LTLIBRARIES = libmailutils.la 29 lib_LTLIBRARIES = libmailutils.la
30 30
......
1 # This file is part of GNU Mailutils.
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16
17 EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
18 DISTCLEANFILES = atconfig $(check_SCRIPTS)
19 MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
20
21 ## ------------ ##
22 ## package.m4. ##
23 ## ------------ ##
24
25 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
26 $(AM_V_GEN){ \
27 echo '# Signature of the current package.'; \
28 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
29 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
30 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
31 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
32 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
33 } >$(srcdir)/package.m4
34
35 #
36
37 ## -------------------------- ##
38 ## Non-installable programs
39 ## -------------------------- ##
40
41 INCLUDES = @MU_LIB_COMMON_INCLUDES@
42 noinst_PROGRAMS = \
43 addr\
44 argcv\
45 decode2047\
46 encode2047\
47 fltst\
48 mailcap\
49 mimetest\
50 url-parse
51
52 LDADD =\
53 ../../lib/libmuaux.la\
54 ${MU_LIB_MBOX}\
55 ${MU_LIB_IMAP}\
56 ${MU_LIB_POP}\
57 ${MU_LIB_AUTH}\
58 @MU_AUTHLIBS@\
59 ${MU_LIB_MAILUTILS}
60
61 EXTRA_DIST += Encode Decode
62
63 ## ------------ ##
64 ## Test suite. ##
65 ## ------------ ##
66
67 TESTSUITE_AT = \
68 address.at\
69 argcv.at\
70 base64d.at\
71 base64e.at\
72 decode2047.at\
73 encode2047.at\
74 mailcap.at\
75 mime.at\
76 testsuite.at\
77 url.at
78
79 TESTSUITE = $(srcdir)/testsuite
80 M4=m4
81
82 AUTOTEST = $(AUTOM4TE) --language=autotest
83 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
84 $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
85 $(AM_V_at)mv $@.tmp $@
86
87 atconfig: $(top_builddir)/config.status
88 cd $(top_builddir) && ./config.status tests/$@
89
90 clean-local:
91 @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
92
93 check-local: atconfig atlocal $(TESTSUITE)
94 @$(SHELL) $(TESTSUITE)
95
96 # Run the test suite on the *installed* tree.
97 #installcheck-local:
98 # $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
99
100
1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2010 Free Software
3 Foundation, Inc.
4
5 GNU Mailutils is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GNU Mailutils is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNU Mailutils; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 MA 02110-1301 USA */
19
20 #ifdef HAVE_CONFIG_H
21 # include <config.h>
22 #endif
23 #include <stdio.h>
24 #include <string.h>
25 #include <errno.h>
26
27 #include <mailutils/address.h>
28 #include <mailutils/errno.h>
29 #include <mailutils/kwd.h>
30 #include <mailutils/mutil.h>
31
32 #define EPARSE MU_ERR_NOENT
33
34 int
35 main (int argc, char *argv[])
36 {
37 char *str;
38 size_t i;
39 size_t pcount = 0;
40 int status;
41 const char *buf;
42 mu_address_t address = NULL;
43 struct mu_address hint;
44
45 if (argc != 2)
46 {
47 fprintf (stderr, "usage: %s address\n", argv[0]);
48 return 2;
49 }
50 str = argv[1];
51
52 hint.domain = "localhost";
53 status = mu_address_create_hint (&address, str, &hint, MU_ADDR_HINT_DOMAIN);
54 mu_address_get_count (address, &pcount);
55
56 if (status)
57 {
58 fprintf (stderr, "%s\n", mu_errname (status));
59 return 1;
60 }
61 else
62 printf ("naddr: %lu\n", (unsigned long) pcount);
63
64 for (i = 1; i <= pcount; i++)
65 {
66 int isgroup;
67
68 mu_address_is_group (address, i, &isgroup);
69 printf ("%lu. ", (unsigned long) i);
70
71 if (isgroup)
72 {
73 mu_address_sget_personal (address, i, &buf);
74 printf ("group <%s>:\n", buf);
75 }
76 else
77 {
78 mu_address_sget_email (address, i, &buf);
79 printf ("email <%s>:\n", buf);
80 }
81
82 if (mu_address_sget_personal (address, i, &buf) == 0 && buf && !isgroup)
83 printf ("personal <%s>\n", buf);
84
85 if (mu_address_sget_comments (address, i, &buf) == 0 && buf)
86 printf ("comments <%s>\n", buf);
87
88 if (mu_address_sget_local_part (address, i, &buf) == 0 && buf)
89 {
90 printf ("local-part <%s>", buf);
91
92 if (mu_address_sget_domain (address, i, &buf) == 0 && buf)
93 printf (" domain <%s>", buf);
94
95 printf ("\n");
96 }
97
98 if (mu_address_sget_route (address, i, &buf) == 0 && buf)
99 printf ("route <%s>\n", buf);
100 }
101 mu_address_destroy (&address);
102 return 0;
103 }
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 dnl ------------------------------------------------------------
19 dnl TESTADDR(ADDR, [KW = `'], [STATUS = `0'], [STDOUT = `'],
20 dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
21 dnl
22 m4_define([TESTADDR],[
23 AT_SETUP([Address: [$1]])
24 AT_KEYWORDS([address $2])
25 AT_CHECK([addr '[$1]'],m4_shift(m4_shift($@)))
26 AT_CLEANUP
27 ])
28
29 TESTADDR([Sam <@[matrix (smtp)], @[nexus: [node 12]]:sroberts@[10].[1]>],[],
30 [1],
31 [],
32 [MU_ERR_BAD_822_FORMAT
33 ])
34
35 TESTADDR([a@b,z@y],[],
36 [0],
37 [naddr: 2
38 1. email <a@b>:
39 local-part <a> domain <b>
40 2. email <z@y>:
41 local-part <z> domain <y>
42 ])
43
44 TESTADDR([,a@b,z@y],[],
45 [0],
46 [naddr: 2
47 1. email <a@b>:
48 local-part <a> domain <b>
49 2. email <z@y>:
50 local-part <z> domain <y>
51 ])
52
53 TESTADDR([a@b,z@y,],[],
54 [0],
55 [naddr: 2
56 1. email <a@b>:
57 local-part <a> domain <b>
58 2. email <z@y>:
59 local-part <z> domain <y>
60 ])
61
62 TESTADDR([,a@b,z@y,],[],
63 [0],
64 [naddr: 2
65 1. email <a@b>:
66 local-part <a> domain <b>
67 2. email <z@y>:
68 local-part <z> domain <y>
69 ])
70
71 TESTADDR([a@b,,z@y],[],
72 [0],
73 [naddr: 2
74 1. email <a@b>:
75 local-part <a> domain <b>
76 2. email <z@y>:
77 local-part <z> domain <y>
78 ])
79
80 TESTADDR([a@b,,,z@y],[],
81 [0],
82 [naddr: 2
83 1. email <a@b>:
84 local-part <a> domain <b>
85 2. email <z@y>:
86 local-part <z> domain <y>
87 ])
88
89 TESTADDR([,,,a@b,,,],[],
90 [0],
91 [naddr: 1
92 1. email <a@b>:
93 local-part <a> domain <b>
94 ])
95
96 TESTADDR([,a@b],[],
97 [0],
98 [naddr: 1
99 1. email <a@b>:
100 local-part <a> domain <b>
101 ])
102
103 TESTADDR([a@b,],[],
104 [0],
105 [naddr: 1
106 1. email <a@b>:
107 local-part <a> domain <b>
108 ])
109
110 TESTADDR([,],[],
111 [1],
112 [],
113 [MU_ERR_EMPTY_ADDRESS
114 ])
115
116 TESTADDR([,,],[],
117 [1],
118 [],
119 [MU_ERR_EMPTY_ADDRESS
120 ])
121
122 TESTADDR([,,],[],
123 [1],
124 [],
125 [MU_ERR_EMPTY_ADDRESS
126 ])
127
128 TESTADDR([a group: a@b,z@y;],[group],
129 [0],
130 [naddr: 2
131 1. email <a@b>:
132 local-part <a> domain <b>
133 2. email <z@y>:
134 local-part <z> domain <y>
135 ])
136
137 TESTADDR([a group: ,a@b,z@y;],[group],
138 [0],
139 [naddr: 2
140 1. email <a@b>:
141 local-part <a> domain <b>
142 2. email <z@y>:
143 local-part <z> domain <y>
144 ])
145
146 TESTADDR([a group: a@b,z@y,;],[group],
147 [0],
148 [naddr: 2
149 1. email <a@b>:
150 local-part <a> domain <b>
151 2. email <z@y>:
152 local-part <z> domain <y>
153 ])
154
155 TESTADDR([a group: ,a@b,z@y,;],[group],
156 [0],
157 [naddr: 2
158 1. email <a@b>:
159 local-part <a> domain <b>
160 2. email <z@y>:
161 local-part <z> domain <y>
162 ])
163
164 TESTADDR([a group: a@b,,z@y;],[group],
165 [0],
166 [naddr: 2
167 1. email <a@b>:
168 local-part <a> domain <b>
169 2. email <z@y>:
170 local-part <z> domain <y>
171 ])
172
173 TESTADDR([a group: a@b,,,z@y;],[group],
174 [0],
175 [naddr: 2
176 1. email <a@b>:
177 local-part <a> domain <b>
178 2. email <z@y>:
179 local-part <z> domain <y>
180 ])
181
182 TESTADDR([a group: ,,,a@b,,, ;],[group],
183 [0],
184 [naddr: 1
185 1. email <a@b>:
186 local-part <a> domain <b>
187 ])
188
189 TESTADDR([a group: ,a@b ;],[group],
190 [0],
191 [naddr: 1
192 1. email <a@b>:
193 local-part <a> domain <b>
194 ])
195
196 TESTADDR([a group: a@b, ;],[group],
197 [0],
198 [naddr: 1
199 1. email <a@b>:
200 local-part <a> domain <b>
201 ])
202
203 TESTADDR([a group: , ;],[group],
204 [1],
205 [],
206 [MU_ERR_EMPTY_ADDRESS
207 ])
208
209 TESTADDR([a group: ,, ;],[group],
210 [1],
211 [],
212 [MU_ERR_EMPTY_ADDRESS
213 ])
214
215 TESTADDR([a group: ,, ;],[group],
216 [1],
217 [],
218 [MU_ERR_EMPTY_ADDRESS
219 ])
220
221 TESTADDR([Sam <@[matrix (smtp)], @[nexus: [node 12]]:sroberts@[10].[1]> ;],[],
222 [1],
223 [],
224 [MU_ERR_BAD_822_FORMAT
225 ])
226
227 TESTADDR([Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];],[],
228 [0],
229 [[naddr: 2
230 1. email <sam@sam>:
231 personal <Sam>
232 local-part <sam> domain <sam>
233 route <@[matrix (smtp)]>
234 2. email <sroberts@[10].[1]>:
235 local-part <sroberts> domain <[10].[1]>
236 ]])
237
238 TESTADDR([lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];],
239 [],
240 [0],
241 [[naddr: 3
242 1. email <lo@hi>:
243 local-part <lo> domain <hi>
244 2. email <sam@sam>:
245 personal <Sam>
246 local-part <sam> domain <sam>
247 route <@[matrix (smtp)]>
248 3. email <sroberts@[10].[1]>:
249 local-part <sroberts> domain <[10].[1]>
250 ]])
251
252 TESTADDR([Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo],
253 [],
254 [0],
255 [[naddr: 3
256 1. email <sam@sam>:
257 personal <Sam>
258 local-part <sam> domain <sam>
259 route <@[matrix (smtp)]>
260 2. email <sroberts@[10].[1]>:
261 local-part <sroberts> domain <[10].[1]>
262 3. email <hi@lo>:
263 local-part <hi> domain <lo>
264 ]])
265
266 TESTADDR([lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo],
267 [],
268 [0],
269 [[naddr: 4
270 1. email <lo@hi>:
271 local-part <lo> domain <hi>
272 2. email <sam@sam>:
273 personal <Sam>
274 local-part <sam> domain <sam>
275 route <@[matrix (smtp)]>
276 3. email <sroberts@[10].[1]>:
277 local-part <sroberts> domain <[10].[1]>
278 4. email <hi@lo>:
279 local-part <hi> domain <lo>
280 ]])
281
282 TESTADDR([Sam <@mail2.uniserve.com:sroberts@uniserve.com>],[],
283 [0],
284 [naddr: 1
285 1. email <sroberts@uniserve.com>:
286 personal <Sam>
287 local-part <sroberts> domain <uniserve.com>
288 route <@mail2.uniserve.com>
289 ])
290
291 TESTADDR([< (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com (hoo!):sroberts@uniserve.com>],[],
292 [1],
293 [],
294 [MU_ERR_BAD_822_FORMAT
295 ])
296
297 TESTADDR([hw@570.com (Hardware Support Account)],[],
298 [0],
299 [naddr: 1
300 1. email <hw@570.com>:
301 personal <Hardware Support Account>
302 local-part <hw> domain <570.com>
303 ])
304
305 TESTADDR([list-ietf-wg-apps-drums@faerber.muc.de (=?ISO-8859-1?Q?Claus_F=E4rber?=)],[],
306 [0],
307 [naddr: 1
308 1. email <list-ietf-wg-apps-drums@faerber.muc.de>:
309 personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
310 local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
311 ])
312
313 TESTADDR([<mutt-dev@mutt.org>(mutt #369), guug-bugs-closed@guug.de (#369)],[],
314 [0],
315 [naddr: 2
316 1. email <mutt-dev@mutt.org>:
317 local-part <mutt-dev> domain <mutt.org>
318 2. email <guug-bugs-closed@guug.de>:
319 personal <#369>
320 local-part <guug-bugs-closed> domain <guug.de>
321 ])
322
323 dnl --------------------------------------------------------------------------
324 dnl FIXME:
325 m4_if([TESTADDR(["'Aernoudt Bottemanne'" <Aernoudt.Bottemanne@Informix.com>],[],
326 [0],
327 [naddr: 1
328 1. email <Aernoudt.Bottemanne@Informix.com>:
329 personal <'Aernoudt Bottemanne'>
330 local-part <Aernoudt.Bottemanne> domain <Informix.com>
331 ])
332
333 TESTADDR(["'Haag, Ullrich - MBDC'" <Ullrich.Haag@MBDC.com>,],[],
334 [0],
335 [naddr: 1
336 1. email <Ullrich.Haag@MBDC.com>:
337 personal <'Haag, Ullrich - MBDC'>
338 local-part <Ullrich.Haag> domain <MBDC.com>
339 ])
340
341 TESTADDR(["'Michael C. Ibarra'" <ibarra@hawk.com>, arl@q7.net, Al <arl@q7.net>],
342 [],
343 [0],
344 [naddr: 3
345 1. email <ibarra@hawk.com>:
346 personal <'Michael C. Ibarra'>
347 local-part <ibarra> domain <hawk.com>
348 2. email <arl@q7.net>:
349 local-part <arl> domain <q7.net>
350 3. email <arl@q7.net>:
351 personal <Al>
352 local-part <arl> domain <q7.net>
353 ])
354
355 TESTADDR(["'Sam Roberts'" <sam@cogent.ca>],[],
356 [0],
357 [naddr: 1
358 1. email <sam@cogent.ca>:
359 personal <'Sam Roberts'>
360 local-part <sam> domain <cogent.ca>
361 ])
362
363 TESTADDR(["'paul@pitbull-productions.com'" <paul@pitbull-productions.com>,],[],
364 [0],
365 [naddr: 1
366 1. email <paul@pitbull-productions.com>:
367 personal <'paul@pitbull-productions.com'>
368 local-part <paul> domain <pitbull-productions.com>
369 ])
370
371 TESTADDR(["'sam@cogent.ca'" <sam@cogent.ca>, "'sroberts@uniserve.com'"],[],
372 [1],
373 [],
374 [MU_ERR_BAD_822_FORMAT
375 ])
376
377 TESTADDR(["'sroberts\@certicom\.ca'" <sroberts@certicom.ca>],[]
378 [0],
379 [naddr: 1
380 1. email <sroberts@certicom.ca>:
381 personal <'sroberts@certicom.ca'>
382 local-part <sroberts> domain <certicom.ca>
383 ])
384
385 ])
386 dnl --------------------------------------------------------------------------
387
388 TESTADDR(["=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" <jcmarcos@datavoice.es>],[],
389 [0],
390 [naddr: 1
391 1. email <jcmarcos@datavoice.es>:
392 personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
393 local-part <jcmarcos> domain <datavoice.es>
394 ])
395
396 TESTADDR(["Christian Edward Gruber" <christian.edward.gruber@gmx.net>,],[],
397 [0],
398 [naddr: 1
399 1. email <christian.edward.gruber@gmx.net>:
400 personal <Christian Edward Gruber>
401 local-part <christian.edward.gruber> domain <gmx.net>
402 ])
403
404 TESTADDR(["D. J. Bernstein" <"djb- "@cr.yp.to>],[],
405 [0],
406 [naddr: 1
407 1. email <"djb- "@cr.yp.to>:
408 personal <D. J. Bernstein>
409 local-part <djb- > domain <cr.yp.to>
410 ])
411
412 TESTADDR(["D. J. Bernstein" <djb@cr.yp.to>, drums@cs.utk.edu],[],
413 [0],
414 [naddr: 2
415 1. email <djb@cr.yp.to>:
416 personal <D. J. Bernstein>
417 local-part <djb> domain <cr.yp.to>
418 2. email <drums@cs.utk.edu>:
419 local-part <drums> domain <cs.utk.edu>
420 ])
421
422 TESTADDR(["Dave Sill <de5-drums" <de5-drums@sws5.ctd.ornl.gov>],[],
423 [0],
424 [naddr: 1
425 1. email <de5-drums@sws5.ctd.ornl.gov>:
426 personal <Dave Sill <de5-drums>
427 local-part <de5-drums> domain <sws5.ctd.ornl.gov>
428 ])
429
430 TESTADDR(["Dave \(work\) Baerg \(E-mail\)" <Dave.Baerg@SUMMedia.com>],[],
431 [0],
432 [naddr: 1
433 1. email <Dave.Baerg@SUMMedia.com>:
434 personal <Dave (work) Baerg (E-mail)>
435 local-part <Dave.Baerg> domain <SUMMedia.com>
436 ])
437
438 TESTADDR(["Demian" <damient@wave.home.com>],[],
439 [0],
440 [naddr: 1
441 1. email <damient@wave.home.com>:
442 personal <Demian>
443 local-part <damient> domain <wave.home.com>
444 ])
445
446 TESTADDR(["Detailed Revision/Update of Message Standards" <drums@cs.utk.edu>],[],
447 [0],
448 [naddr: 1
449 1. email <drums@cs.utk.edu>:
450 personal <Detailed Revision/Update of Message Standards>
451 local-part <drums> domain <cs.utk.edu>
452 ])
453
454 TESTADDR(["Fred" <fprog@__nowhere__.users.sourceforge.net>],[],
455 [0],
456 [naddr: 1
457 1. email <fprog@__nowhere__.users.sourceforge.net>:
458 personal <Fred>
459 local-part <fprog> domain <__nowhere__.users.sourceforge.net>
460 ])
461
462 TESTADDR(["Haag, Ullrich - MBDC" <Ullrich.Haag@MBDC.com>],[],
463 [0],
464 [naddr: 1
465 1. email <Ullrich.Haag@MBDC.com>:
466 personal <Haag, Ullrich - MBDC>
467 local-part <Ullrich.Haag> domain <MBDC.com>
468 ])
469
470 TESTADDR(["Jacob Palme" <jpalme@dsv.su.se>, <drums@cs.utk.edu>],[],
471 [0],
472 [naddr: 2
473 1. email <jpalme@dsv.su.se>:
474 personal <Jacob Palme>
475 local-part <jpalme> domain <dsv.su.se>
476 2. email <drums@cs.utk.edu>:
477 local-part <drums> domain <cs.utk.edu>
478 ])
479
480 dnl FIXME
481 m4_if([
482 TESTADDR(["Jakob 'sparky' Kaivo" <jkaivo@elijah.nodomainname.net>],[],
483 [0],
484 [naddr: 1
485 1. email <jkaivo@elijah.nodomainname.net>:
486 personal <Jakob 'sparky' Kaivo>
487 local-part <jkaivo> domain <elijah.nodomainname.net>
488 ])
489 ])
490
491 TESTADDR(["Lee R. Copp" <Lee.R.Copp@MichiganScientific.com>],[],
492 [0],
493 [naddr: 1
494 1. email <Lee.R.Copp@MichiganScientific.com>:
495 personal <Lee R. Copp>
496 local-part <Lee.R.Copp> domain <MichiganScientific.com>
497 ])
498
499 TESTADDR(["Lionel Johnson" <ljohnson**nospam**@sterling1.com>],[],
500 [0],
501 [naddr: 1
502 1. email <ljohnson**nospam**@sterling1.com>:
503 personal <Lionel Johnson>
504 local-part <ljohnson**nospam**> domain <sterling1.com>
505 ])
506
507 TESTADDR(["Martin [Keso] Keseg" <Martin.Keseg@slovakia.sun.com>],[],
508 [0],
509 [[naddr: 1
510 1. email <Martin.Keseg@slovakia.sun.com>:
511 personal <Martin [Keso] Keseg>
512 local-part <Martin.Keseg> domain <slovakia.sun.com>
513 ]])
514
515 TESTADDR(["}{ristoph" <news2@kristoph.net>],[],
516 [0],
517 [naddr: 1
518 1. email <news2@kristoph.net>:
519 personal <}{ristoph>
520 local-part <news2> domain <kristoph.net>
521 ])
522
523 TESTADDR(["fmartens-2000" <fmartens-2000@planet.nl>],[],
524 [0],
525 [naddr: 1
526 1. email <fmartens-2000@planet.nl>:
527 personal <fmartens-2000>
528 local-part <fmartens-2000> domain <planet.nl>
529 ])
530
531 dnl FIXME
532 m4_if([
533 TESTADDR(["g'o'tz ohnesorge" <gohnesorge@lh-computertechnik.de>],[],
534 [0],
535 [naddr: 1
536 1. email <gohnesorge@lh-computertechnik.de>:
537 personal <g'o'tz ohnesorge>
538 local-part <gohnesorge> domain <lh-computertechnik.de>
539 ])
540
541 ])
542
543 TESTADDR(["gao jie" <jiegi@public.wh.hb.cn>],[],
544 [0],
545 [naddr: 1
546 1. email <jiegi@public.wh.hb.cn>:
547 personal <gao jie>
548 local-part <jiegi> domain <public.wh.hb.cn>
549 ])
550
551 TESTADDR(["gnupg-devel@gnupg.org" <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>],
552 [],
553 [0],
554 [naddr: 1
555 1. email <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>:
556 personal <gnupg-devel@gnupg.org>
557 local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
558 ])
559
560 TESTADDR(["gpg-devel" <gnupg-devel@gnupg.org>],[],
561 [0],
562 [naddr: 1
563 1. email <gnupg-devel@gnupg.org>:
564 personal <gpg-devel>
565 local-part <gnupg-devel> domain <gnupg.org>
566 ])
567
568 TESTADDR(["jigang" <jigang@jinglun.com.cn>],[],
569 [0],
570 [naddr: 1
571 1. email <jigang@jinglun.com.cn>:
572 personal <jigang>
573 local-part <jigang> domain <jinglun.com.cn>
574 ])
575
576 TESTADDR(["misc@openbsd.org" <misc@openbsd.org>],[],
577 [0],
578 [naddr: 1
579 1. email <misc@openbsd.org>:
580 personal <misc@openbsd.org>
581 local-part <misc> domain <openbsd.org>
582 ])
583
584 TESTADDR(["misc@openbsd.org" <misc@openbsd.org>, brian@Awfulhak.org],[],
585 [0],
586 [naddr: 2
587 1. email <misc@openbsd.org>:
588 personal <misc@openbsd.org>
589 local-part <misc> domain <openbsd.org>
590 2. email <brian@Awfulhak.org>:
591 local-part <brian> domain <Awfulhak.org>
592 ])
593
594 TESTADDR(["mutt-dev @ mutt . orgThomas Roessler" <roessler@does-not-exist.org>],[],
595 [0],
596 [naddr: 1
597 1. email <roessler@does-not-exist.org>:
598 personal <mutt-dev @ mutt . orgThomas Roessler>
599 local-part <roessler> domain <does-not-exist.org>
600 ])
601
602 TESTADDR(["zwk@f36.n480.z2.fidonet.org" <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>],[],
603 [0],
604 [naddr: 1
605 1. email <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>:
606 personal <zwk@f36.n480.z2.fidonet.org>
607 local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
608 ])
609
610 dnl FIXME
611 m4_if([
612 TESTADDR(['Dan Dall'Acqua' <ddallacqua@noetic.ab.ca>, 'Dave Shyong'],[],
613 [1],
614 [],
615 [MU_ERR_BAD_822_FORMAT
616 ])
617
618 ])
619
620 TESTADDR([0xdeadbeef-request@petting-zoo.net],[],
621 [0],
622 [naddr: 1
623 1. email <0xdeadbeef-request@petting-zoo.net>:
624 local-part <0xdeadbeef-request> domain <petting-zoo.net>
625 ])
626
627 TESTADDR([102023-00406421@cnxt19932218.conexant.com],[],
628 [0],
629 [naddr: 1
630 1. email <102023-00406421@cnxt19932218.conexant.com>:
631 local-part <102023-00406421> domain <cnxt19932218.conexant.com>
632 ])
633
634 TESTADDR([218164.24.43@jobcontrolcenter.com],[],
635 [0],
636 [naddr: 1
637 1. email <218164.24.43@jobcontrolcenter.com>:
638 local-part <218164.24.43> domain <jobcontrolcenter.com>
639 ])
640
641 TESTADDR([<0xdeadbeef-request@petting-zoo.net>],[],
642 [0],
643 [naddr: 1
644 1. email <0xdeadbeef-request@petting-zoo.net>:
645 local-part <0xdeadbeef-request> domain <petting-zoo.net>
646 ])
647
648 TESTADDR([<>],[],
649 [0],
650 [naddr: 1
651 1. email <>:
652 ])
653
654 TESTADDR([<Christia.Roberts@nrc.ca>],[],
655 [0],
656 [naddr: 1
657 1. email <Christia.Roberts@nrc.ca>:
658 local-part <Christia.Roberts> domain <nrc.ca>
659 ])
660
661 TESTADDR([<Nick_Shelness@motorcity2.lotus.com>],[],
662 [0],
663 [naddr: 1
664 1. email <Nick_Shelness@motorcity2.lotus.com>:
665 local-part <Nick_Shelness> domain <motorcity2.lotus.com>
666 ])
667
668 TESTADDR([<all: >],[],
669 [1],
670 [],
671 [MU_ERR_BAD_822_FORMAT
672 ])
673
674 TESTADDR([<fyi-admin@emyr.net>],[],
675 [0],
676 [naddr: 1
677 1. email <fyi-admin@emyr.net>:
678 local-part <fyi-admin> domain <emyr.net>
679 ])
680
681 TESTADDR([<gary.stefanov@medtronic.com>, <HdeVisse@husky.ca>,],[],
682 [0],
683 [naddr: 2
684 1. email <gary.stefanov@medtronic.com>:
685 local-part <gary.stefanov> domain <medtronic.com>
686 2. email <HdeVisse@husky.ca>:
687 local-part <HdeVisse> domain <husky.ca>
688 ])
689
690 TESTADDR([<gnu-pop-list@nodomainname.net>],[],
691 [0],
692 [naddr: 1
693 1. email <gnu-pop-list@nodomainname.net>:
694 local-part <gnu-pop-list> domain <nodomainname.net>
695 ])
696
697 TESTADDR([<mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>],[],
698 [0],
699 [naddr: 1
700 1. email <mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>:
701 local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
702 ])
703
704 TESTADDR([=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <kolla@nvg.ntnu.no>],[],
705 [0],
706 [naddr: 1
707 1. email <kolla@nvg.ntnu.no>:
708 personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
709 local-part <kolla> domain <nvg.ntnu.no>
710 ])
711
712 TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>],[],
713 [0],
714 [naddr: 1
715 1. email <paf@cisco.com>:
716 personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
717 local-part <paf> domain <cisco.com>
718 ])
719
720 TESTADDR([=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>,],[],
721 [0],
722 [naddr: 1
723 1. email <paf@cisco.com>:
724 personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
725 local-part <paf> domain <cisco.com>
726 ])
727
728 TESTADDR([=?US-ASCII?Q?gary=5Fc?= <gary_c@cunningham-lee.com>],[],
729 [0],
730 [naddr: 1
731 1. email <gary_c@cunningham-lee.com>:
732 personal <=?US-ASCII?Q?gary=5Fc?=>
733 local-part <gary_c> domain <cunningham-lee.com>
734 ])
735
736 TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>],[],
737 [0],
738 [naddr: 1
739 1. email <0@pervalidus.net>:
740 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
741 local-part <0> domain <pervalidus.net>
742 ])
743
744 TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>,],[],
745 [0],
746 [naddr: 1
747 1. email <0@pervalidus.net>:
748 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
749 local-part <0> domain <pervalidus.net>
750 ])
751
752 TESTADDR([=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?= <0@pervalidus.net>],[],
753 [0],
754 [naddr: 1
755 1. email <0@pervalidus.net>:
756 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?=>
757 local-part <0> domain <pervalidus.net>
758 ])
759
760 TESTADDR([=?iso-8859-1?Q?J=F8rgen_Thomsen?= <jth@postfix.jth.net>],[],
761 [0],
762 [naddr: 1
763 1. email <jth@postfix.jth.net>:
764 personal <=?iso-8859-1?Q?J=F8rgen_Thomsen?=>
765 local-part <jth> domain <postfix.jth.net>
766 ])
767
768 TESTADDR([=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?= <jose@jaimedelamo.eu.org>],[],
769 [0],
770 [naddr: 1
771 1. email <jose@jaimedelamo.eu.org>:
772 personal <=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?=>
773 local-part <jose> domain <jaimedelamo.eu.org>
774 ])
775
776 TESTADDR([=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@dna.fi>],[],
777 [0],
778 [naddr: 1
779 1. email <Mikko.Hanninen@dna.fi>:
780 personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
781 local-part <Mikko.Hanninen> domain <dna.fi>
782 ])
783
784 TESTADDR([=?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@iki.fi>],[],
785 [0],
786 [naddr: 1
787 1. email <Mikko.Hanninen@iki.fi>:
788 personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
789 local-part <Mikko.Hanninen> domain <iki.fi>
790 ])
791
792 TESTADDR([=?iso-8859-1?Q?R=E9mi_Guyomarch?= <rguyom@321.net>],[],
793 [0],
794 [naddr: 1
795 1. email <rguyom@321.net>:
796 personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
797 local-part <rguyom> domain <321.net>
798 ])
799
800 TESTADDR([=?iso-8859-1?Q?Ulf_M=F6ller?= <ulf@fitug.de>],[],
801 [0],
802 [naddr: 1
803 1. email <ulf@fitug.de>:
804 personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
805 local-part <ulf> domain <fitug.de>
806 ])
807
808 TESTADDR([ANDREW MARTIN <amartin@ee.ryerson.ca>],[],
809 [0],
810 [naddr: 1
811 1. email <amartin@ee.ryerson.ca>:
812 personal <ANDREW MARTIN>
813 local-part <amartin> domain <ee.ryerson.ca>
814 ])
815
816 TESTADDR([Abhay Ghaisas <abhay@sobolev.does-not-exist.org>, mutt-dev@mutt.org],[],
817 [0],
818 [naddr: 2
819 1. email <abhay@sobolev.does-not-exist.org>:
820 personal <Abhay Ghaisas>
821 local-part <abhay> domain <sobolev.does-not-exist.org>
822 2. email <mutt-dev@mutt.org>:
823 local-part <mutt-dev> domain <mutt.org>
824 ])
825
826 TESTADDR([Brian Salter-Duke <b_duke@lacebark.ntu.edu.au>],[],
827 [0],
828 [naddr: 1
829 1. email <b_duke@lacebark.ntu.edu.au>:
830 personal <Brian Salter-Duke>
831 local-part <b_duke> domain <lacebark.ntu.edu.au>
832 ])
833
834 TESTADDR([Catharine Shyong <shyong@t-iii.com>],[],
835 [0],
836 [naddr: 1
837 1. email <shyong@t-iii.com>:
838 personal <Catharine Shyong>
839 local-part <shyong> domain <t-iii.com>
840 ])
841
842 TESTADDR([DRUMS-Last-Call:;],[],
843 [1],
844 [],
845 [MU_ERR_EMPTY_ADDRESS
846 ])
847
848 TESTADDR([Detailed Revision/Update of Message Standards <drums@cs.utk.edu>],[],
849 [0],
850 [naddr: 1
851 1. email <drums@cs.utk.edu>:
852 personal <Detailed Revision/Update of Message Standards>
853 local-part <drums> domain <cs.utk.edu>
854 ])
855
856 TESTADDR([Eric Allman <eric+ietf@Sendmail.ORG>],[],
857 [0],
858 [naddr: 1
859 1. email <eric+ietf@Sendmail.ORG>:
860 personal <Eric Allman>
861 local-part <eric+ietf> domain <Sendmail.ORG>
862 ])
863
864 TESTADDR([Gary <Gary@e-c-s-uk.com>],[],
865 [0],
866 [naddr: 1
867 1. email <Gary@e-c-s-uk.com>:
868 personal <Gary>
869 local-part <Gary> domain <e-c-s-uk.com>
870 ])
871
872 TESTADDR([IETF working group on revision of mail standards <drums@cs.utk.edu>],[],
873 [0],
874 [naddr: 1
875 1. email <drums@cs.utk.edu>:
876 personal <IETF working group on revision of mail standards>
877 local-part <drums> domain <cs.utk.edu>
878 ])
879
880 TESTADDR([IETF-Announce:;],[],
881 [1],
882 [],
883 [MU_ERR_EMPTY_ADDRESS
884 ])
885
886 TESTADDR([IETF-Announce:;, drums@cs.utk.edu],[],
887 [0],
888 [naddr: 1
889 1. email <drums@cs.utk.edu>:
890 local-part <drums> domain <cs.utk.edu>
891 ])
892
893 TESTADDR([Jean-Baptiste Marchand <Jean-Baptiste.Marchand@epita.fr>],[],
894 [0],
895 [naddr: 1
896 1. email <Jean-Baptiste.Marchand@epita.fr>:
897 personal <Jean-Baptiste Marchand>
898 local-part <Jean-Baptiste.Marchand> domain <epita.fr>
899 ])
900
901 TESTADDR([Jonathan Rozes <jrozes+969649116.89117462@vinton.com>],[],
902 [0],
903 [naddr: 1
904 1. email <jrozes+969649116.89117462@vinton.com>:
905 personal <Jonathan Rozes>
906 local-part <jrozes+969649116.89117462> domain <vinton.com>
907 ])
908
909 TESTADDR([Jose "C." Garcia Sogo<jose@jaimedelamo.eu.org>],[],
910 [0],
911 [naddr: 1
912 1. email <jose@jaimedelamo.eu.org>:
913 personal <Jose C. Garcia Sogo>
914 local-part <jose> domain <jaimedelamo.eu.org>
915 ])
916
917 dnl FIXME
918 m4_if([
919 TESTADDR([Marco d'Itri <md@Linux.IT>,[],
920 [0],
921 1. email <md@Linux.IT>:
922 personal <Marco d'Itri>
923 local-part <md> domain <Linux.IT>
924 ])
925 ])
926
927 TESTADDR([No_Reply-To@mapquest.com],[],
928 [0],
929 [naddr: 1
930 1. email <No_Reply-To@mapquest.com>:
931 local-part <No_Reply-To> domain <mapquest.com>
932 ])
933
934 TESTADDR([OSULLIE@rte.ie, skidswam@hotmail.com, boot],[],
935 [0],
936 [naddr: 3
937 1. email <OSULLIE@rte.ie>:
938 local-part <OSULLIE> domain <rte.ie>
939 2. email <skidswam@hotmail.com>:
940 local-part <skidswam> domain <hotmail.com>
941 3. email <boot@localhost>:
942 local-part <boot> domain <localhost>
943 ])
944
945 TESTADDR([Paul Hoffman / IMC <phoffman@imc.org>],[],
946 [0],
947 [naddr: 1
948 1. email <phoffman@imc.org>:
949 personal <Paul Hoffman / IMC>
950 local-part <phoffman> domain <imc.org>
951 ])
952
953 TESTADDR([Sam],[],
954 [0],
955 [naddr: 1
956 1. email <Sam@localhost>:
957 local-part <Sam> domain <localhost>
958 ])
959
960 TESTADDR([Sam Roberts <sam@cogent.ca>],[],
961 [0],
962 [naddr: 1
963 1. email <sam@cogent.ca>:
964 personal <Sam Roberts>
965 local-part <sam> domain <cogent.ca>
966 ])
967
968 TESTADDR([Sam_Roberts/Certicom%Certicom@certicom.com],[],
969 [0],
970 [naddr: 1
971 1. email <Sam_Roberts/Certicom%Certicom@certicom.com>:
972 local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
973 ])
974
975 TESTADDR([Thomas Roessler <roessler@does-not-exist.org>, 490@bugs.guug.de],[],
976 [0],
977 [naddr: 2
978 1. email <roessler@does-not-exist.org>:
979 personal <Thomas Roessler>
980 local-part <roessler> domain <does-not-exist.org>
981 2. email <490@bugs.guug.de>:
982 local-part <490> domain <bugs.guug.de>
983 ])
984
985 TESTADDR([Thomas Roessler <roessler@does-not-exist.org>, g10@gnupg.org],[],
986 [0],
987 [naddr: 2
988 1. email <roessler@does-not-exist.org>:
989 personal <Thomas Roessler>
990 local-part <roessler> domain <does-not-exist.org>
991 2. email <g10@gnupg.org>:
992 local-part <g10> domain <gnupg.org>
993 ])
994
995 TESTADDR([ddickey@ip-12-22-50-150.hqglobal.net],[],
996 [0],
997 [naddr: 1
998 1. email <ddickey@ip-12-22-50-150.hqglobal.net>:
999 local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
1000 ])
1001
1002 TESTADDR([ktb <x.y.f@home.com>],[],
1003 [0],
1004 [naddr: 1
1005 1. email <x.y.f@home.com>:
1006 personal <ktb>
1007 local-part <x.y.f> domain <home.com>
1008 ])
1009
1010 dnl FIXME
1011 m4_if([
1012 TESTADDR([mcaustin@eudoramail.com, aposner@usaid.gov, Kieran.O'Leary@anpost.ie],[],
1013 [0],
1014 [naddr: 3
1015 1. email <mcaustin@eudoramail.com>:
1016 local-part <mcaustin> domain <eudoramail.com>
1017 2. email <aposner@usaid.gov>:
1018 local-part <aposner> domain <usaid.gov>
1019 3. email <Kieran.O'Leary@anpost.ie>:
1020 local-part <Kieran.O'Leary> domain <anpost.ie>
1021 ])
1022 ])
1023
1024 TESTADDR([rfunk@wks.uts.ohio-state.eduofflinemailer-bounce@dikke.penguin.nl],[],
1025 [1],
1026 [],
1027 [MU_ERR_BAD_822_FORMAT
1028 ])
1029
1030 TESTADDR([root],[],
1031 [0],
1032 [naddr: 1
1033 1. email <root@localhost>:
1034 local-part <root> domain <localhost>
1035 ])
1036
1037 dnl FIXME srr <sam@localhost>=> error MU_ERR_BAD_822_FORMAT
1038
1039 TESTADDR([whom it may concern: ;;whom.it.may.concern: ;],[],
1040 [1],
1041 [],
1042 [MU_ERR_BAD_822_FORMAT
1043 ])
1044
1045 TESTADDR([whom it may concern: mutt-dev@mutt.org, mutt-users@mutt.org;],[],
1046 [0],
1047 [naddr: 2
1048 1. email <mutt-dev@mutt.org>:
1049 local-part <mutt-dev> domain <mutt.org>
1050 2. email <mutt-users@mutt.org>:
1051 local-part <mutt-users> domain <mutt.org>
1052 ])
1053
1054 TESTADDR([Sergey V. Poznyakoff <gray@gnu.org>],[],
1055 [0],
1056 [naddr: 1
1057 1. email <gray@gnu.org>:
1058 personal <Sergey V. Poznyakoff>
1059 local-part <gray> domain <gnu.org>
1060 ])
1061
1062 TESTADDR([P. D. Q. Bach <bach@somewhere.org>],[],
1063 [0],
1064 [naddr: 1
1065 1. email <bach@somewhere.org>:
1066 personal <P. D. Q. Bach>
1067 local-part <bach> domain <somewhere.org>
1068 ])
1069
1070 TESTADDR(["A bad quote\" <devnull@localhost>],[],
1071 [1],
1072 [],
1073 [MU_ERR_BAD_822_FORMAT
1074 ])
1075
1076
1077
1078
1079
1080
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 dnl ------------------------------------------------------------
19 dnl TESTARGS([NAME], [KW = `'], [INPUT], [STDOUT = `'],
20 dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
21 dnl
22 m4_define([TESTARGS],[
23 AT_SETUP([Argcv: $1])
24 AT_KEYWORDS([argcv $2])
25 AT_CHECK([
26 AT_DATA([input],[$3
27 ])
28 argcv < input],[0],m4_shift(m4_shift(m4_shift($@))))
29 AT_CLEANUP
30 ])
31
32 dnl ------------------------------------------------------------
33 TESTARGS([simple input],[],
34 [1 2 3],
35 [3: 1 2 3
36 ])
37
38 TESTARGS([quoted space],[],
39 [quoted\ space],
40 [1: "quoted space"
41 ])
42
43 TESTARGS([tab character],[],
44 [a "tab character"],
45 [2: a tab\tcharacter
46 ])
47
48 TESTARGS([octal and hex escapes],[],
49 [\157\143\164\141\154\40and\x20\x68\x65\x78],
50 [1: "octal and hex"
51 ])
52
53 TESTARGS([octal and hex escapes 2],[],
54 [\157\143\164\141\154\40 and \x20\x68\x65\x78],
55 [3: "octal " and " hex"
56 ])
57
58 TESTARGS([escape representation],[],
59 [A\x3-\48\39],
60 [1: A\003-\0048\0039
61 ])
62
63 TESTARG([8-bit input],[],
64 [×ÅÒÈÎÑÑ ÐÏÌÏ×ÉÎÁ ÔÁÂÌÉÃÙ],
65 [3: \327\305\322\310\316\321\321 \320\317\314\317\327\311\316\301 \324\301\302\314\311\303\331])
66
67 TESTARG([misquoted input],[],
68 [messed up'quotations ' in "a single'" "command" lin"e],
69 [6: messed "upquotations " in "a single'" command "lin\"e"
70 ])
71
72 TESTARG([unbalanced quote],[],
73 ['unbalanced "quote],
74 [2: 'unbalanced "\"quote"
75 ])
76
77 TESTARG([unbalanced quote 2],[],
78 [unbalanced "quote],
79 [2: unbalanced "\"quote"
80 ])
81
82 TESTARG([unbalanced quote 3],[],
83 ["],
84 [1: "\""
85 ])
86
87
88
89
90
91
1 # @configure_input@ -*- shell-script -*-
2 # Configurable variable values for Mailutils test suite.
3 # Copyright (C) 2004, 2010 Free Software Foundation, Inc.
4
5 PATH=@abs_builddir@:@abs_top_builddir@/frm:$top_srcdir:$srcdir:$PATH
6 top_srcdir=@abs_top_srcdir@
7 top_builddir=@abs_top_builddir@
8
9
...\ No newline at end of file ...\ No newline at end of file
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 AT_SETUP([base64 decoding (read)])
19 AT_KEYWORDS([base64 base64d base64dr decode])
20
21 AT_CHECK([
22 cp $top_srcdir/libmailutils/tests/Encode expout
23 fltst base64 decode read linelen=0 < $top_srcdir/libmailutils/tests/Decode],
24 [0],
25 [expout])
26
27 AT_CLEANUP
28
29
30 AT_SETUP([base64 decoding (write)])
31 AT_KEYWORDS([base64 base64d base64dw decode])
32
33 AT_CHECK([
34 cp $top_srcdir/libmailutils/tests/Encode expout
35 fltst base64 decode write linelen=0 < $top_srcdir/libmailutils/tests/Decode],
36 [0],
37 [expout])
38
39 AT_CLEANUP
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 AT_SETUP([base64 encoding (read)])
19 AT_KEYWORDS([base64 base64e base64er encode])
20
21 AT_CHECK([
22 cp $top_srcdir/libmailutils/tests/Decode expout
23 fltst base64 encode read nl < $top_srcdir/libmailutils/tests/Encode],
24 [0],
25 [expout])
26
27 AT_CLEANUP
28
29
30 AT_SETUP([base64 encoding (write)])
31 AT_KEYWORDS([base64 base64e base64ew encode])
32
33 AT_CHECK([
34 cp $top_srcdir/libmailutils/tests/Decode expout
35 fltst base64 encode write nl < $top_srcdir/libmailutils/tests/Encode],
36 [0],
37 [expout])
38
39 AT_CLEANUP
...\ No newline at end of file ...\ No newline at end of file
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 dnl ------------------------------------------------------------
19 dnl TESTDEC2047([NAME], [KW = `'], [INPUT], [STDOUT = `'],
20 dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
21 dnl
22 m4_define([TESTDEC2047],[
23 AT_SETUP([Decode 2047: m4_if([$1],[],[$3],[$1])])
24 AT_KEYWORDS([decode2047 decode $2])
25 AT_CHECK([
26 AT_DATA([input],[$3
27 ])
28 decode2047 -p < input],[0],m4_shift(m4_shift(m4_shift($@))))
29 AT_CLEANUP
30 ])
31
32 dnl ------------------------------------------------------------
33 TESTDEC2047([],[decode01],
34 [=?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>],
35 [Keith Moore <moore@cs.utk.edu>
36 ])
37
38 TESTDEC2047([],[decode02],
39 [=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>],
40 [Keld J\370rn Simonsen <keld@dkuug.dk>
41 ])
42
43 TESTDEC2047([],[decode03],
44 [=?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>],
45 [Andr\351 Pirard <PIRARD@vm1.ulg.ac.be>
46 ])
47
48 TESTDEC2047([],[decode04],
49 [=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= ... =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=],
50 [If you can read this yo ... u understand the example.
51 ])
52
53 # Malformed input string: lacks trailing =. MU 0.6.90 hanged on it.
54 TESTDEC2047([malformed input],[decode05],
55 [=?koi8-r?B?RndkOiDSxcfJ09TSwcPJ0SDEz83FzsE?=],
56 [Fwd: \322\305\307\311\323\324\322\301\303\311\321 \304\317\315\305
57 ])
58
59
60
...@@ -71,8 +71,9 @@ main (int argc, char *argv[]) ...@@ -71,8 +71,9 @@ main (int argc, char *argv[])
71 if (len > 0 && buf[len - 1] == '\n') 71 if (len > 0 && buf[len - 1] == '\n')
72 buf[len - 1] = 0; 72 buf[len - 1] = 0;
73 rc = mu_rfc2047_decode (charset, buf, &p); 73 rc = mu_rfc2047_decode (charset, buf, &p);
74 printf ("%s=> %s\n", buf, mu_strerror (rc)); 74 if (rc)
75 if (p) 75 fprintf (stderr, "%s", mu_strerror (rc));
76 else if (p)
76 print (p, printable); 77 print (p, printable);
77 putchar ('\n'); 78 putchar ('\n');
78 free (p); 79 free (p);
......
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 AT_SETUP([encode2047])
19 AT_KEYWORDS([encode])
20
21 AT_CHECK([
22 AT_DATA(input,[dnl
23 \\345\326\305\304\316\305\327\316\331\312\040\317\324\336\305\324
24 ])
25
26 encode2047 -c koi8-r -eB -o < input],
27 [0],
28 [=?koi8-r?B?5dbFxM7F187ZyiDP1N7F1A==?=
29 ])
30
31 AT_CLEANUP
32
...@@ -197,8 +197,9 @@ main (int argc, char *argv[]) ...@@ -197,8 +197,9 @@ main (int argc, char *argv[])
197 decode_octal (cmd); 197 decode_octal (cmd);
198 198
199 rc = mu_rfc2047_encode (charset, encoding, cmd, &p); 199 rc = mu_rfc2047_encode (charset, encoding, cmd, &p);
200 printf ("%s=> %s\n", buf, mu_strerror (rc)); 200 if (rc)
201 if (p) 201 fprintf (stderr, "%s", mu_strerror (rc));
202 else if (p)
202 printf ("%s\n", p); 203 printf ("%s\n", p);
203 free (p); 204 free (p);
204 } 205 }
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007, 2010 Free Software
3 Foundation, Inc.
4
5 GNU Mailutils is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GNU Mailutils is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNU Mailutils; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 MA 02110-1301 USA */
19
20 #ifdef HAVE_CONFIG_H
21 # include <config.h>
22 #endif
23 #include <unistd.h>
24 #include <stdio.h>
25 #include <assert.h>
26 #include <ctype.h>
27 #include <string.h>
28 #include <mailutils/mailutils.h>
29
30 #define ISPRINT(c) ((c)>=' '&&(c)<127)
31
32 int verbose = 0;
33 int printable = 0;
34
35 static void
36 c_copy (mu_stream_t out, mu_stream_t in)
37 {
38 if (printable)
39 {
40 char c;
41 size_t size;
42
43 while (mu_stream_read (in, &c, 1, &size) == 0 && size > 0)
44 {
45 int rc;
46
47 if (printable && !ISPRINT (c))
48 {
49 char outbuf[24];
50 sprintf (outbuf, "\\%03o", (unsigned char) c);
51 rc = mu_stream_write (out, outbuf, strlen (outbuf), NULL);
52 }
53 else
54 rc = mu_stream_write (out, &c, 1, NULL);
55 }
56 }
57 else
58 MU_ASSERT (mu_stream_copy (out, in, 0, NULL));
59
60 if (verbose)
61 fprintf (stderr, "\ntotal: %lu/%lu bytes\n",
62 (unsigned long) mu_stream_bytes_in (in),
63 (unsigned long) mu_stream_bytes_out (out));
64
65 }
66
67 /* Set the maximum line length for the filter NAME to LENGTH.
68 FIXME: This is a kludge. Perhaps API should provide a function
69 for that. */
70 static void
71 reset_line_length (const char *name, size_t length)
72 {
73 mu_list_t list;
74 int status;
75 mu_filter_record_t frec;
76
77 mu_filter_get_list (&list);
78 status = mu_list_locate (list, (void*)name, (void**)&frec);
79 if (status == 0)
80 frec->max_line_length = length;
81 /* don't bail out, leave that to mu_filter_create */
82 }
83
84 void
85 usage (const char *diag)
86 {
87 FILE *fp;
88
89 if (diag)
90 {
91 fp = stderr;
92 fprintf (fp, "%s\n", diag);
93 }
94 else
95 fp = stdout;
96
97 fprintf (fp, "%s",
98 "usage: fltst FILTER {encode|decode} {read|write} [shift=N] [linelen=N] [verbose] [printable] [nl]\n");
99 exit (diag ? 1 : 0);
100 }
101
102 int
103 main (int argc, char * argv [])
104 {
105 mu_stream_t in, out, flt;
106 int i;
107 int mode = MU_FILTER_ENCODE;
108 int flags = MU_STREAM_READ;
109 char *fltname;
110 mu_off_t shift = 0;
111 size_t line_length;
112 int line_length_option = 0;
113 int newline_option = 0;
114
115 if (argc == 1)
116 usage (NULL);
117 if (argc < 3)
118 usage ("not enough arguments");
119
120 fltname = argv[1];
121
122 if (strcmp (argv[2], "encode") == 0)
123 mode = MU_FILTER_ENCODE;
124 else if (strcmp (argv[2], "decode") == 0)
125 mode = MU_FILTER_DECODE;
126 else
127 usage ("2nd arg is wrong");
128
129 if (strcmp (argv[3], "read") == 0)
130 flags = MU_STREAM_READ;
131 else if (strcmp (argv[3], "write") == 0)
132 flags = MU_STREAM_WRITE;
133 else
134 usage ("3rd arg is wrong");
135
136 for (i = 4; i < argc; i++)
137 {
138 if (strncmp (argv[i], "shift=", 6) == 0)
139 shift = strtoul (argv[i] + 6, NULL, 0);
140 else if (strncmp (argv[i], "linelen=", 8) == 0)
141 {
142 line_length = strtoul (argv[i] + 8, NULL, 10);
143 line_length_option = 1;
144 }
145 else if (strcmp (argv[i], "verbose") == 0)
146 verbose++;
147 else if (strcmp (argv[i], "printable") == 0)
148 printable++;
149 else if (strcmp (argv[i], "nl") == 0)
150 newline_option++;
151 else
152 usage ("wrong option");
153 }
154
155 MU_ASSERT (mu_stdio_stream_create (&in, MU_STDIN_FD, 0));
156 MU_ASSERT (mu_stream_open (in));
157
158 MU_ASSERT (mu_stdio_stream_create (&out, MU_STDOUT_FD, 0));
159 MU_ASSERT (mu_stream_open (out));
160
161 if (line_length_option)
162 reset_line_length (fltname, line_length);
163
164 if (flags == MU_STREAM_READ)
165 {
166 MU_ASSERT (mu_filter_create (&flt, in, fltname, mode,
167 MU_STREAM_READ|MU_STREAM_SEEK|
168 MU_STREAM_AUTOCLOSE));
169 if (shift)
170 MU_ASSERT (mu_stream_seek (flt, shift, MU_SEEK_SET, NULL));
171 c_copy (out, flt);
172 }
173 else
174 {
175 MU_ASSERT (mu_filter_create (&flt, out, fltname, mode,
176 MU_STREAM_WRITE));
177 if (shift)
178 MU_ASSERT (mu_stream_seek (in, shift, MU_SEEK_SET, NULL));
179 c_copy (flt, in);
180
181 mu_stream_close (in);
182 mu_stream_destroy (&in);
183 }
184
185 mu_stream_close (flt);
186 mu_stream_destroy (&flt);
187
188 if (newline_option)
189 mu_stream_write (out, "\n", 1, NULL);
190
191 mu_stream_close (out);
192 mu_stream_destroy (&out);
193
194 return 0;
195 }
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 dnl ------------------------------------------------------------
19 dnl MAILCAP([NAME], [KW = `'], [INPUT], [STDOUT = `'],
20 dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
21 dnl
22 m4_define([MAILCAP],[
23 AT_SETUP([Mailcap: [$1]])
24 AT_KEYWORDS([mailcap $2])
25 AT_CHECK([
26 AT_DATA([input],[$3
27 ])
28 mailcap input],[0],m4_shift(m4_shift(m4_shift($@))))
29 AT_CLEANUP
30 ])
31
32 dnl ------------------------------------------------------------
33
34 MAILCAP([1],[mailcap01],
35 [text/plain; less '%s'; needsterminal],
36 [[entry[1]
37 typefield: text/plain
38 view-command: less '%s'
39 fields[1]: needsterminal
40
41 ]])
42
43 MAILCAP([2],[mailcap02],
44 [text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n "$DISPLAY"],
45 [[entry[1]
46 typefield: text/html
47 view-command: gnome-help-browser '%s'
48 fields[1]: nametemplate=%s.html
49 fields[2]: test=test -n "$DISPLAY"
50
51 ]])
52
53 MAILCAP([3],[mailcap03],
54 [application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; \
55 copiousoutput; print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
56 ],
57 [[entry[1]
58 typefield: application/x-troff-man
59 view-command: /usr/bin/nroff -mandoc -Tlatin1
60 fields[1]: copiousoutput
61 fields[2]: print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
62
63 ]])
64
65 MAILCAP([4],[mailcap04],
66 [text/plain; shownonascii iso-8859-1 '%s'; description="Plain ASCII Text"; \
67 test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
68 [[entry[1]
69 typefield: text/plain
70 view-command: shownonascii iso-8859-1 '%s'
71 fields[1]: description="Plain ASCII Text"
72 fields[2]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
73
74 ]])
75
76 MAILCAP([5],[mailcap05],
77 [text/richtext; shownonascii iso-8859-1 -e richtext -p '%s'; \
78 description="Richtext"; copiousoutput; \
79 test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
80 [[entry[1]
81 typefield: text/richtext
82 view-command: shownonascii iso-8859-1 -e richtext -p '%s'
83 fields[1]: description="Richtext"
84 fields[2]: copiousoutput
85 fields[3]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
86
87 ]])
88
89 MAILCAP([6],[mailcap06],
90 [text/enriched; shownonascii iso-8859-1 -e richtext -e -p '%s'; \
91 description="Enriched Text"; \
92 copiousoutput; \
93 test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""],
94 [[entry[1]
95 typefield: text/enriched
96 view-command: shownonascii iso-8859-1 -e richtext -e -p '%s'
97 fields[1]: description="Enriched Text"
98 fields[2]: copiousoutput
99 fields[3]: test=test "$(echo %{charset} | tr "A-Z" "a-z")" = iso-8859-1 -a "$DISPLAY" != ""
100
101 ]])
102
103 MAILCAP([7],[mailcap07],
104 [message/partial; showpartial '%s' %{id} %{number} %{total}; description="An incomplete message"],
105 [[entry[1]
106 typefield: message/partial
107 view-command: showpartial '%s' %{id} %{number} %{total}
108 fields[1]: description="An incomplete message"
109
110 ]])
111
112 MAILCAP([8],[mailcap08],
113 [message/external-body; showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}; needsterminal; description="A reference to data stored in an external location"; composetyped="extcompose '%s"'],
114 [[entry[1]
115 typefield: message/external-body
116 view-command: showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}
117 fields[1]: needsterminal
118 fields[2]: description="A reference to data stored in an external location"
119 fields[3]: composetyped="extcompose '%s"'
120
121 ]])
122
123 MAILCAP([9],[mailcap09],
124 [application/x-dvi; /usr/bin/xdvi '%s'; test=test -n "$DISPLAY"; description=TeX DVI file; nametemplate=%s.dvi],
125 [[entry[1]
126 typefield: application/x-dvi
127 view-command: /usr/bin/xdvi '%s'
128 fields[1]: test=test -n "$DISPLAY"
129 fields[2]: description=TeX DVI file
130 fields[3]: nametemplate=%s.dvi
131
132 ]])
133
134 MAILCAP([10],[mailcap10],
135 [text/plain; more '%s'; needsterminal],
136 [[entry[1]
137 typefield: text/plain
138 view-command: more '%s'
139 fields[1]: needsterminal
140
141 ]])
142
143 MAILCAP([11],[mailcap11],
144 [text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
145 [[entry[1]
146 typefield: text/html
147 view-command: /usr/bin/links '%s'
148 fields[1]: needsterminal
149 fields[2]: description=HTML Text
150 fields[3]: nametemplate=%s.html
151
152 ]])
153
154 MAILCAP([12],[mailcap12],
155 [text/richtext; richtext '%s'; description="Richtext"; copiousoutput],
156 [[entry[1]
157 typefield: text/richtext
158 view-command: richtext '%s'
159 fields[1]: description="Richtext"
160 fields[2]: copiousoutput
161
162 ]])
163
164 MAILCAP([13],[mailcap13],
165 [text/enriched; richtext -e '%s'; description="Enriched Text"; copiousoutput],
166 [[entry[1]
167 typefield: text/enriched
168 view-command: richtext -e '%s'
169 fields[1]: description="Enriched Text"
170 fields[2]: copiousoutput
171
172 ]])
173
174 MAILCAP([14],[mailcap14],
175 [text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
176 [[entry[1]
177 typefield: text/html
178 view-command: /usr/bin/w3m -T text/html '%s'
179 fields[1]: needsterminal
180 fields[2]: description=HTML Text
181 fields[3]: nametemplate=%s.html
182
183 ]])
184
185 MAILCAP([15],[mailcap15],
186 [text/html; /usr/bin/links -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
187 [[entry[1]
188 typefield: text/html
189 view-command: /usr/bin/links -dump '%s'
190 fields[1]: copiousoutput
191 fields[2]: description=HTML Text
192 fields[3]: nametemplate=%s.html
193
194 ]])
195
196 MAILCAP([16],[mailcap16],
197 [text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html],
198 [[entry[1]
199 typefield: text/html
200 view-command: /usr/bin/lynx -force_html '%s'
201 fields[1]: needsterminal
202 fields[2]: description=HTML Text
203 fields[3]: nametemplate=%s.html
204
205 ]])
206
207 MAILCAP([17],[mailcap17],
208 [text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
209 [[entry[1]
210 typefield: text/html
211 view-command: /usr/bin/w3m -dump -T text/html '%s'
212 fields[1]: copiousoutput
213 fields[2]: description=HTML Text
214 fields[3]: nametemplate=%s.html
215
216 ]])
217
218 MAILCAP([18],[mailcap18],
219 [text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text],
220 [[entry[1]
221 typefield: text/html
222 view-command: /usr/bin/html2text '%s'
223 fields[1]: copiousoutput
224 fields[2]: description=HTML Text
225
226 ]])
227
228 MAILCAP([19],[mailcap19],
229 [text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html],
230 [[entry[1]
231 typefield: text/html
232 view-command: /usr/bin/lynx -dump -force_html '%s'
233 fields[1]: copiousoutput
234 fields[2]: description=HTML Text
235 fields[3]: nametemplate=%s.html
236
237 ]])
238
239 MAILCAP([20],[mailcap20],
240 [text/*; less '%s'; needsterminal],
241 [[entry[1]
242 typefield: text/*
243 view-command: less '%s'
244 fields[1]: needsterminal
245
246 ]])
247
248 MAILCAP([21],[mailcap21],
249 [text/*; more '%s'; needsterminal],
250 [[entry[1]
251 typefield: text/*
252 view-command: more '%s'
253 fields[1]: needsterminal
254
255 ]])
256
257 MAILCAP([22],[mailcap22],
258 [application/x-debian-package; /usr/lib/mime/debian-view '%s'; \
259 needsterminal; description=Debian GNU/Linux Package; \
260 nametemplate=%s.deb],
261 [[entry[1]
262 typefield: application/x-debian-package
263 view-command: /usr/lib/mime/debian-view '%s'
264 fields[1]: needsterminal
265 fields[2]: description=Debian GNU/Linux Package
266 fields[3]: nametemplate=%s.deb
267
268 ]])
269
270 MAILCAP([23],[mailcap23],
271 [audio/basic; /usr/lib/mime/playaudio '%s'; description=Basic uLaw Audio; \
272 nametemplate=%s.au],
273 [[entry[1]
274 typefield: audio/basic
275 view-command: /usr/lib/mime/playaudio '%s'
276 fields[1]: description=Basic uLaw Audio
277 fields[2]: nametemplate=%s.au
278
279 ]])
1 # This file is part of Mailutils testsuite. 1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc. 2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 # 3 #
4 # This program is free software; you can redistribute it and/or modify 4 # GNU Mailutils is free software; you can redistribute it and/or
5 # it under the terms of the GNU General Public License as published by 5 # modify it under the terms of the GNU General Public License as
6 # the Free Software Foundation; either version 3 of the License, or 6 # published by the Free Software Foundation; either version 3, or (at
7 # (at your option) any later version. 7 # your option) any later version.
8 # 8 #
9 # This program is distributed in the hope that it will be useful, 9 # This program is distributed in the hope that it will be useful, but
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # GNU General Public License for more details. 12 # General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation, 15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 # This file is part of Mailfromd testsuite.
17 # 17
18 # NOTE: Apart from this comment, the contents of this file is taken verbatim. 18 AT_SETUP([mime])
19 # Please be sure you don't add any extra newlines. 19
20 Message: 1 20 # FIXME: Mimetest should probably be fixed to avoid the use of `tr'
21 # and `sed' here.
22 AT_CHECK([mimetest -i 0 -p $top_srcdir/testsuite/spool/mbox1 | dnl
23 tr '\t' ' ' | sed 's/ *$//'],
24 [0],
25 [Message: 1
21 From: Foo Bar <foobar@nonexistent.net> 26 From: Foo Bar <foobar@nonexistent.net>
22 Subject: Jabberwocky 27 Subject: Jabberwocky
23 Number of parts in message - 1 28 Number of parts in message - 1
...@@ -100,7 +105,7 @@ With gently smiling jaws! ...@@ -100,7 +105,7 @@ With gently smiling jaws!
100 End 105 End
101 Type of part 2 = application/octet-stream 106 Type of part 2 = application/octet-stream
102 Message part size - 645/11: 183/5, 462/6 107 Message part size - 645/11: 183/5, 462/6
103 Attachment - saving [msg.21] 108 Attachment - saving [[msg.21]]
104 Begin 109 Begin
105 `You are old, Father William,' the young man said, 110 `You are old, Father William,' the young man said,
106 `And your hair has become very white; 111 `And your hair has become very white;
...@@ -141,7 +146,7 @@ Encapsulated message : ...@@ -141,7 +146,7 @@ Encapsulated message :
141 Begin 146 Begin
142 Type of part 1 = application/octet-stream 147 Type of part 1 = application/octet-stream
143 Message part size - 663/12: 184/5, 479/7 148 Message part size - 663/12: 184/5, 479/7
144 Attachment - saving [msg.22] 149 Attachment - saving [[msg.22]]
145 Begin 150 Begin
146 `You are old,' said the youth, `as I mentioned before, 151 `You are old,' said the youth, `as I mentioned before,
147 And have grown most uncommonly fat; 152 And have grown most uncommonly fat;
...@@ -160,7 +165,7 @@ Encapsulated message : ...@@ -160,7 +165,7 @@ Encapsulated message :
160 Begin 165 Begin
161 Type of part 1 = application/octet-stream 166 Type of part 1 = application/octet-stream
162 Message part size - 668/12: 185/5, 483/7 167 Message part size - 668/12: 185/5, 483/7
163 Attachment - saving [msg.23] 168 Attachment - saving [[msg.23]]
164 Begin 169 Begin
165 `You are old,' said the youth, `and your jaws are too weak 170 `You are old,' said the youth, `and your jaws are too weak
166 For anything tougher than suet; 171 For anything tougher than suet;
...@@ -175,7 +180,7 @@ Has lasted the rest of my life.' ...@@ -175,7 +180,7 @@ Has lasted the rest of my life.'
175 End 180 End
176 Type of part 2 = application/octet-stream 181 Type of part 2 = application/octet-stream
177 Message part size - 679/12: 184/5, 495/7 182 Message part size - 679/12: 184/5, 495/7
178 Attachment - saving [msg.24] 183 Attachment - saving [[msg.24]]
179 Begin 184 Begin
180 `You are old,' said the youth, `one would hardly suppose 185 `You are old,' said the youth, `one would hardly suppose
181 That your eye was as steady as ever; 186 That your eye was as steady as ever;
...@@ -210,3 +215,6 @@ Begin ...@@ -210,3 +215,6 @@ Begin
210 215
211 216
212 End 217 End
218 ])
219
220 AT_CLEANUP
...\ No newline at end of file ...\ No newline at end of file
......
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 m4_include([testsuite.inc])
19
20 AT_INIT
21
22 m4_include([address.at])
23 m4_include([argcv.at])
24 m4_include([mime.at])
25 m4_include([url.at])
26 m4_include([mailcap.at])
27 m4_include([base64e.at])
28 m4_include([base64d.at])
29 m4_include([decode2047.at])
30 m4_include([encode2047.at])
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 mu_error ("cannot get %s: %s", #field, mu_strerror (status)); \ 39 mu_error ("cannot get %s: %s", #field, mu_strerror (status)); \
40 exit (1); \ 40 exit (1); \
41 } \ 41 } \
42 printf ("\t" #field " <%s>\n", buf) 42 printf (#field " <%s>\n", buf)
43 43
44 static void 44 static void
45 print_fvpairs (mu_url_t url) 45 print_fvpairs (mu_url_t url)
...@@ -55,7 +55,7 @@ print_fvpairs (mu_url_t url) ...@@ -55,7 +55,7 @@ print_fvpairs (mu_url_t url)
55 if (fvc == 0) 55 if (fvc == 0)
56 return; 56 return;
57 for (i = 0; i < fvc; i++) 57 for (i = 0; i < fvc; i++)
58 printf ("\tparam[%lu] <%s>\n", (unsigned long) i, fvp[i]); 58 printf ("param[%lu] <%s>\n", (unsigned long) i, fvp[i]);
59 } 59 }
60 60
61 static void 61 static void
...@@ -72,7 +72,7 @@ print_query (mu_url_t url) ...@@ -72,7 +72,7 @@ print_query (mu_url_t url)
72 if (qargc == 0) 72 if (qargc == 0)
73 return; 73 return;
74 for (i = 0; i < qargc; i++) 74 for (i = 0; i < qargc; i++)
75 printf ("\tquery[%lu] <%s>\n", (unsigned long) i, qargv[i]); 75 printf ("query[%lu] <%s>\n", (unsigned long) i, qargv[i]);
76 } 76 }
77 77
78 int 78 int
...@@ -99,18 +99,16 @@ main () ...@@ -99,18 +99,16 @@ main ()
99 } 99 }
100 if ((rc = mu_url_parse (u)) != 0) 100 if ((rc = mu_url_parse (u)) != 0)
101 { 101 {
102 printf ("%s => FAILED: [%d] %s\n", 102 fprintf (stderr, "%s\n", mu_errname (rc));
103 str, rc, mu_strerror (rc));
104 continue; 103 continue;
105 } 104 }
106 printf ("%s => SUCCESS\n", str);
107 105
108 GET_AND_PRINT (scheme, u, buf, rc); 106 GET_AND_PRINT (scheme, u, buf, rc);
109 GET_AND_PRINT (user, u, buf, rc); 107 GET_AND_PRINT (user, u, buf, rc);
110 108
111 rc = mu_url_get_secret (u, &secret); 109 rc = mu_url_get_secret (u, &secret);
112 if (rc == MU_ERR_NOENT) 110 if (rc == MU_ERR_NOENT)
113 printf ("\tpasswd <>\n"); 111 printf ("passwd <>\n");
114 else if (rc) 112 else if (rc)
115 { 113 {
116 mu_error ("cannot get %s: %s", "passwd", mu_strerror (rc)); 114 mu_error ("cannot get %s: %s", "passwd", mu_strerror (rc));
...@@ -118,7 +116,7 @@ main () ...@@ -118,7 +116,7 @@ main ()
118 } 116 }
119 else 117 else
120 { 118 {
121 printf ("\tpasswd <%s>\n", mu_secret_password (secret)); 119 printf ("passwd <%s>\n", mu_secret_password (secret));
122 mu_secret_password_unref (secret); 120 mu_secret_password_unref (secret);
123 } 121 }
124 122
...@@ -131,7 +129,7 @@ main () ...@@ -131,7 +129,7 @@ main ()
131 mu_error ("cannot get %s: %s", "port", mu_strerror (rc)); 129 mu_error ("cannot get %s: %s", "port", mu_strerror (rc));
132 exit (1); 130 exit (1);
133 } 131 }
134 printf ("\tport %ld\n", port); 132 printf ("port %ld\n", port);
135 133
136 GET_AND_PRINT (path, u, buf, rc); 134 GET_AND_PRINT (path, u, buf, rc);
137 print_fvpairs (u); 135 print_fvpairs (u);
......
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite.
17
18 dnl ------------------------------------------------------------
19 dnl TESTURL([NAME], [KW = `'], [INPUT], [STDOUT = `'],
20 dnl [STDERR = `'], [RUN-IF-FAIL], [RUN-IF-PASS])
21 dnl
22 m4_define([TESTURL],[
23 AT_SETUP([URL: m4_if([$1],[],[$3],[$1])])
24 AT_KEYWORDS([url $2])
25 AT_CHECK([
26 AT_DATA([input],[$3
27 ])
28 url-parse < input],[0],m4_shift(m4_shift(m4_shift($@))))
29 AT_CLEANUP
30 ])
31
32 dnl ------------------------------------------------------------
33
34 TESTURL([],[],
35 [scheme:],
36 [scheme <scheme>
37 user <>
38 passwd <>
39 auth <>
40 host <>
41 port 0
42 path <>
43 ])
44
45 TESTURL([],[],
46 [scheme:/absolute/path],
47 [scheme <scheme>
48 user <>
49 passwd <>
50 auth <>
51 host <>
52 port 0
53 path </absolute/path>
54 ])
55
56 TESTURL([],[],
57 [scheme:relative/path],
58 [scheme <scheme>
59 user <>
60 passwd <>
61 auth <>
62 host <>
63 port 0
64 path <relative/path>
65 ])
66
67 TESTURL([],[],
68 [scheme:///absolute/path],
69 [scheme <scheme>
70 user <>
71 passwd <>
72 auth <>
73 host <>
74 port 0
75 path </absolute/path>
76 ])
77
78 TESTURL([],[],
79 [scheme://%75%73%65%72:%70%61%73%73@%68%6f%73%74],
80 [scheme <scheme>
81 user <user>
82 passwd <pass>
83 auth <>
84 host <host>
85 port 0
86 path <>
87 ])
88
89 TESTURL([],[],
90 [ftp://user:pass@host//a/path],
91 [scheme <ftp>
92 user <user>
93 passwd <pass>
94 auth <>
95 host <host>
96 port 0
97 path </a/path>
98 ])
99
100 TESTURL([],[],
101 [ftp://:pass@host//a/path],
102 [scheme <ftp>
103 user <>
104 passwd <pass>
105 auth <>
106 host <host>
107 port 0
108 path </a/path>
109 ])
110
111 TESTURL([],[],
112 [ftp://user:@host//a/path],
113 [scheme <ftp>
114 user <user>
115 passwd <>
116 auth <>
117 host <host>
118 port 0
119 path </a/path>
120 ])
121
122 TESTURL([],[],
123 [ftp://user:pass@//a/path],
124 [scheme <ftp>
125 user <user>
126 passwd <pass>
127 auth <>
128 host <>
129 port 0
130 path </a/path>
131 ])
132
133 TESTURL([],[],
134 [ftp://user:@//a/path],
135 [scheme <ftp>
136 user <user>
137 passwd <>
138 auth <>
139 host <>
140 port 0
141 path </a/path>
142 ])
143
144 TESTURL([],[],
145 [ftp://:@host//a/path],
146 [scheme <ftp>
147 user <>
148 passwd <>
149 auth <>
150 host <host>
151 port 0
152 path </a/path>
153 ])
154
155 TESTURL([],[],
156 [ftp://:pass@//a/path],
157 [scheme <ftp>
158 user <>
159 passwd <pass>
160 auth <>
161 host <>
162 port 0
163 path </a/path>
164 ])
165
166 TESTURL([],[],
167 [ftp://:@//a/path],
168 [scheme <ftp>
169 user <>
170 passwd <>
171 auth <>
172 host <>
173 port 0
174 path </a/path>
175 ])
176
177 TESTURL([],[],
178 [ftp://://a/path],
179 [scheme <ftp>
180 user <>
181 passwd <>
182 auth <>
183 host <>
184 port 0
185 path </a/path>
186 ])
187
188 TESTURL([],[],
189 [ftp://@//a/path],
190 [scheme <ftp>
191 user <>
192 passwd <>
193 auth <>
194 host <>
195 port 0
196 path </a/path>
197 ])
198
199 TESTURL([],[],
200 [ftp:/a/path],
201 [scheme <ftp>
202 user <>
203 passwd <>
204 auth <>
205 host <>
206 port 0
207 path </a/path>
208 ])
209
210 TESTURL([],[],
211 [ftp://user:pass@host/a/path],
212 [scheme <ftp>
213 user <user>
214 passwd <pass>
215 auth <>
216 host <host>
217 port 0
218 path <a/path>
219 ])
220
221
222 TESTURL([],[],
223 [ftp://:pass@host/a/path],
224 [scheme <ftp>
225 user <>
226 passwd <pass>
227 auth <>
228 host <host>
229 port 0
230 path <a/path>
231 ])
232
233 TESTURL([],[],
234 [ftp://user:@host/a/path],
235 [scheme <ftp>
236 user <user>
237 passwd <>
238 auth <>
239 host <host>
240 port 0
241 path <a/path>
242 ])
243
244 TESTURL([],[],
245 [ftp://user:pass@/a/path],
246 [scheme <ftp>
247 user <user>
248 passwd <pass>
249 auth <>
250 host <>
251 port 0
252 path <a/path>
253 ])
254
255 TESTURL([],[],
256 [ftp://user:@/a/path],
257 [scheme <ftp>
258 user <user>
259 passwd <>
260 auth <>
261 host <>
262 port 0
263 path <a/path>
264 ])
265
266 TESTURL([],[],
267 [ftp://:@host/a/path],
268 [scheme <ftp>
269 user <>
270 passwd <>
271 auth <>
272 host <host>
273 port 0
274 path <a/path>
275 ])
276
277 TESTURL([],[],
278 [ftp://:pass@/a/path],
279 [scheme <ftp>
280 user <>
281 passwd <pass>
282 auth <>
283 host <>
284 port 0
285 path <a/path>
286 ])
287
288 TESTURL([],[],
289 [ftp://:@/a/path],
290 [scheme <ftp>
291 user <>
292 passwd <>
293 auth <>
294 host <>
295 port 0
296 path <a/path>
297 ])
298
299 TESTURL([],[],
300 [ftp://:/a/path],
301 [scheme <ftp>
302 user <>
303 passwd <>
304 auth <>
305 host <>
306 port 0
307 path <a/path>
308 ])
309
310 TESTURL([],[],
311 [ftp://@/a/path],
312 [scheme <ftp>
313 user <>
314 passwd <>
315 auth <>
316 host <>
317 port 0
318 path <a/path>
319 ])
320
321 TESTURL([],[],
322 [ftp:///a/path],
323 [scheme <ftp>
324 user <>
325 passwd <>
326 auth <>
327 host <>
328 port 0
329 path </a/path>
330 ])
331
332 TESTURL([],[],
333 [pop://pop.example.net],
334 [scheme <pop>
335 user <>
336 passwd <>
337 auth <>
338 host <pop.example.net>
339 port 0
340 path <>
341 ])
342
343 TESTURL([],[],
344 [pop://user@pop.example.net],
345 [scheme <pop>
346 user <user>
347 passwd <>
348 auth <>
349 host <pop.example.net>
350 port 0
351 path <>
352 ])
353
354 TESTURL([],[],
355 [pop://user:passwd@pop.example.net],
356 [scheme <pop>
357 user <user>
358 passwd <passwd>
359 auth <>
360 host <pop.example.net>
361 port 0
362 path <>
363 ])
364
365 TESTURL([],[],
366 [pop://user;auth=*@pop.example.net],
367 [scheme <pop>
368 user <user>
369 passwd <>
370 auth <*>
371 host <pop.example.net>
372 port 0
373 path <>
374 ])
375
376 TESTURL([],[],
377 [pop://pop.example.net:111],
378 [scheme <pop>
379 user <>
380 passwd <>
381 auth <>
382 host <pop.example.net>
383 port 111
384 path <>
385 ])
386
387 TESTURL([],[],
388 [pop://user@pop.example.net:111],
389 [scheme <pop>
390 user <user>
391 passwd <>
392 auth <>
393 host <pop.example.net>
394 port 111
395 path <>
396 ])
397
398 TESTURL([],[],
399 [pop://user:passwd@pop.example.net:111],
400 [scheme <pop>
401 user <user>
402 passwd <passwd>
403 auth <>
404 host <pop.example.net>
405 port 111
406 path <>
407 ])
408
409 TESTURL([],[],
410 [pop://user;auth=*@pop.example.net:111],
411 [scheme <pop>
412 user <user>
413 passwd <>
414 auth <*>
415 host <pop.example.net>
416 port 111
417 path <>
418 ])
419
420 TESTURL([],[],
421 [imap://imap.example.net],
422 [scheme <imap>
423 user <>
424 passwd <>
425 auth <>
426 host <imap.example.net>
427 port 0
428 path <>
429 ])
430
431 TESTURL([],[],
432 [imap://user@imap.example.net],
433 [scheme <imap>
434 user <user>
435 passwd <>
436 auth <>
437 host <imap.example.net>
438 port 0
439 path <>
440 ])
441
442 TESTURL([],[],
443 [imap://user:passwd@imap.example.net],
444 [scheme <imap>
445 user <user>
446 passwd <passwd>
447 auth <>
448 host <imap.example.net>
449 port 0
450 path <>
451 ])
452
453 TESTURL([],[],
454 [imap://user;auth=*@imap.example.net],
455 [scheme <imap>
456 user <user>
457 passwd <>
458 auth <*>
459 host <imap.example.net>
460 port 0
461 path <>
462 ])
463
464 TESTURL([],[],
465 [imap://imap.example.net:111],
466 [scheme <imap>
467 user <>
468 passwd <>
469 auth <>
470 host <imap.example.net>
471 port 111
472 path <>
473 ])
474
475 TESTURL([],[],
476 [imap://user@imap.example.net:111],
477 [scheme <imap>
478 user <user>
479 passwd <>
480 auth <>
481 host <imap.example.net>
482 port 111
483 path <>
484 ])
485
486 TESTURL([],[],
487 [imap://user:passwd@imap.example.net:111],
488 [scheme <imap>
489 user <user>
490 passwd <passwd>
491 auth <>
492 host <imap.example.net>
493 port 111
494 path <>
495 ])
496
497 TESTURL([],[],
498 [imap://user;auth=*@imap.example.net:111],
499 [scheme <imap>
500 user <user>
501 passwd <>
502 auth <*>
503 host <imap.example.net>
504 port 111
505 path <>
506 ])
507
508 TESTURL([],[],
509 [imap://imap.example.net/mbox],
510 [scheme <imap>
511 user <>
512 passwd <>
513 auth <>
514 host <imap.example.net>
515 port 0
516 path <mbox>
517 ])
518
519 TESTURL([],[],
520 [imap://user@imap.example.net/mbox],
521 [scheme <imap>
522 user <user>
523 passwd <>
524 auth <>
525 host <imap.example.net>
526 port 0
527 path <mbox>
528 ])
529
530 TESTURL([],[],
531 [imap://user:passwd@imap.example.net/mbox],
532 [scheme <imap>
533 user <user>
534 passwd <passwd>
535 auth <>
536 host <imap.example.net>
537 port 0
538 path <mbox>
539 ])
540
541 TESTURL([],[],
542 [imap://user;auth=*@imap.example.net/mbox],
543 [scheme <imap>
544 user <user>
545 passwd <>
546 auth <*>
547 host <imap.example.net>
548 port 0
549 path <mbox>
550 ])
551
552 TESTURL([],[],
553 [imap://imap.example.net:111/mbox],
554 [scheme <imap>
555 user <>
556 passwd <>
557 auth <>
558 host <imap.example.net>
559 port 111
560 path <mbox>
561 ])
562
563 TESTURL([],[],
564 [imap://user@imap.example.net:111/mbox],
565 [scheme <imap>
566 user <user>
567 passwd <>
568 auth <>
569 host <imap.example.net>
570 port 111
571 path <mbox>
572 ])
573
574 TESTURL([],[],
575 [imap://user:passwd@imap.example.net:111/mbox],
576 [scheme <imap>
577 user <user>
578 passwd <passwd>
579 auth <>
580 host <imap.example.net>
581 port 111
582 path <mbox>
583 ])
584
585 TESTURL([],[],
586 [imap://user;auth=*@imap.example.net:111/mbox],
587 [scheme <imap>
588 user <user>
589 passwd <>
590 auth <*>
591 host <imap.example.net>
592 port 111
593 path <mbox>
594 ])
595
596 TESTURL([],[],
597 [imap://imap.example.net/mbox/user@host],
598 [scheme <imap>
599 user <imap.example.net/mbox/user>
600 passwd <>
601 auth <>
602 host <host>
603 port 0
604 path <>
605 ])
606
607 TESTURL([],[],
608 [imap://user@imap.example.net/mbox/user@host],
609 [scheme <imap>
610 user <user>
611 passwd <>
612 auth <>
613 host <imap.example.net>
614 port 0
615 path <mbox/user@host>
616 ])
617
618 TESTURL([],[],
619 [imap://user:passwd@imap.example.net/mbox/user@host],
620 [scheme <imap>
621 user <user>
622 passwd <passwd>
623 auth <>
624 host <imap.example.net>
625 port 0
626 path <mbox/user@host>
627 ])
628
629 TESTURL([],[],
630 [imap://user;auth=*@imap.example.net/mbox/user@host],
631 [scheme <imap>
632 user <user>
633 passwd <>
634 auth <*>
635 host <imap.example.net>
636 port 0
637 path <mbox/user@host>
638 ])
639
640 TESTURL([],[],
641 [imap://imap.example.net:111/mbox/user@host],
642 [scheme <imap>
643 user <imap.example.net>
644 passwd <111/mbox/user>
645 auth <>
646 host <host>
647 port 0
648 path <>
649 ])
650
651 TESTURL([],[],
652 [imap://user@imap.example.net:111/mbox/user@host],
653 [scheme <imap>
654 user <user>
655 passwd <>
656 auth <>
657 host <imap.example.net>
658 port 111
659 path <mbox/user@host>
660 ])
661
662 TESTURL([],[],
663 [imap://user:passwd@imap.example.net:111/mbox/user@host],
664 [scheme <imap>
665 user <user>
666 passwd <passwd>
667 auth <>
668 host <imap.example.net>
669 port 111
670 path <mbox/user@host>
671 ])
672
673 TESTURL([],[],
674 [imap://user;auth=*@imap.example.net:111/mbox/user@host],
675 [scheme <imap>
676 user <user>
677 passwd <>
678 auth <*>
679 host <imap.example.net>
680 port 111
681 path <mbox/user@host>
682 ])
683
684 TESTURL([],[],
685 [ftp://ftp.example.org/mbox/user%40host],
686 [scheme <ftp>
687 user <>
688 passwd <>
689 auth <>
690 host <ftp.example.org>
691 port 0
692 path <mbox/user@host>
693 ])
694
695 TESTURL([],[],
696 [ftp://ftp.example.org:111/mbox/user%40host],
697 [scheme <ftp>
698 user <>
699 passwd <>
700 auth <>
701 host <ftp.example.org>
702 port 111
703 path <mbox/user@host>
704 ])
705
706 TESTURL([],[],
707 [ftp://ftp.example.org:111/mbox/user%40host;type=pass],
708 [[scheme <ftp>
709 user <>
710 passwd <>
711 auth <>
712 host <ftp.example.org>
713 port 111
714 path <mbox/user@host>
715 param[0] <type=pass>
716 ]])
717
718 TESTURL([],[],
719 [mbox:/var/spool/mail;type=index;param=2;user=gray],
720 [[scheme <mbox>
721 user <>
722 passwd <>
723 auth <>
724 host <>
725 port 0
726 path </var/spool/mail>
727 param[0] <type=index>
728 param[1] <param=2>
729 param[2] <user=gray>
730 ]])
731
732 TESTURL([],[],
733 [mbox:///var/spool/mail;type=index;param=2;user=gray],
734 [[scheme <mbox>
735 user <>
736 passwd <>
737 auth <>
738 host <>
739 port 0
740 path </var/spool/mail>
741 param[0] <type=index>
742 param[1] <param=2>
743 param[2] <user=gray>
744 ]])
745
746 TESTURL([],[],
747 [http://gnu.org.ua/home/gray?prog&arg1&arg2],
748 [[scheme <http>
749 user <>
750 passwd <>
751 auth <>
752 host <gnu.org.ua>
753 port 0
754 path <home/gray>
755 query[0] <prog>
756 query[1] <arg1>
757 query[2] <arg2>
758 ]])
759
760 TESTURL([],[],
761 [http://gnu.org.ua/home/gray;foo=bar;baz=qux?prog&arg%201&arg%202],
762 [[scheme <http>
763 user <>
764 passwd <>
765 auth <>
766 host <gnu.org.ua>
767 port 0
768 path <home/gray>
769 param[0] <foo=bar>
770 param[1] <baz=qux>
771 query[0] <prog>
772 query[1] <arg 1>
773 query[2] <arg 2>
774 ]])
775
776
1 Makefile
2 Makefile.in
3 *.log
4 *.sum
5 site.exp
6 remote.exp
7 data
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 test; abc <sascha@silbe.org>=> error MU_ERR_BAD_822_FORMAT
19
20 Sam <@[matrix (smtp)], @[nexus: \[node 12\]]:sroberts@[10].[1]> ;=> error MU_ERR_BAD_822_FORMAT
21
22 a@b,z@y=> pcount 2
23 1 email <a@b>
24 local-part <a> domain <b>
25 2 email <z@y>
26 local-part <z> domain <y>
27
28 ,a@b,z@y=> pcount 2
29 1 email <a@b>
30 local-part <a> domain <b>
31 2 email <z@y>
32 local-part <z> domain <y>
33
34 a@b,z@y,=> pcount 2
35 1 email <a@b>
36 local-part <a> domain <b>
37 2 email <z@y>
38 local-part <z> domain <y>
39
40 ,a@b,z@y,=> pcount 2
41 1 email <a@b>
42 local-part <a> domain <b>
43 2 email <z@y>
44 local-part <z> domain <y>
45
46 a@b,,z@y=> pcount 2
47 1 email <a@b>
48 local-part <a> domain <b>
49 2 email <z@y>
50 local-part <z> domain <y>
51
52 a@b,,,z@y=> pcount 2
53 1 email <a@b>
54 local-part <a> domain <b>
55 2 email <z@y>
56 local-part <z> domain <y>
57
58 ,,,a@b,,,=> pcount 1
59 1 email <a@b>
60 local-part <a> domain <b>
61
62 ,a@b=> pcount 1
63 1 email <a@b>
64 local-part <a> domain <b>
65
66 a@b,=> pcount 1
67 1 email <a@b>
68 local-part <a> domain <b>
69
70 ,=> error MU_ERR_EMPTY_ADDRESS
71
72 ,,=> error MU_ERR_EMPTY_ADDRESS
73
74 ,,,=> error MU_ERR_EMPTY_ADDRESS
75
76 a group: a@b,z@y ;=> pcount 2
77 1 email <a@b>
78 local-part <a> domain <b>
79 2 email <z@y>
80 local-part <z> domain <y>
81
82 a group: ,a@b,z@y ;=> pcount 2
83 1 email <a@b>
84 local-part <a> domain <b>
85 2 email <z@y>
86 local-part <z> domain <y>
87
88 a group: a@b,z@y, ;=> pcount 2
89 1 email <a@b>
90 local-part <a> domain <b>
91 2 email <z@y>
92 local-part <z> domain <y>
93
94 a group: ,a@b,z@y, ;=> pcount 2
95 1 email <a@b>
96 local-part <a> domain <b>
97 2 email <z@y>
98 local-part <z> domain <y>
99
100 a group: a@b,,z@y ;=> pcount 2
101 1 email <a@b>
102 local-part <a> domain <b>
103 2 email <z@y>
104 local-part <z> domain <y>
105
106 a group: a@b,,,z@y ;=> pcount 2
107 1 email <a@b>
108 local-part <a> domain <b>
109 2 email <z@y>
110 local-part <z> domain <y>
111
112 a group: ,,,a@b,,, ;=> pcount 1
113 1 email <a@b>
114 local-part <a> domain <b>
115
116 a group: ,a@b ;=> pcount 1
117 1 email <a@b>
118 local-part <a> domain <b>
119
120 a group: a@b, ;=> pcount 1
121 1 email <a@b>
122 local-part <a> domain <b>
123
124 a group: , ;=> error MU_ERR_EMPTY_ADDRESS
125
126 a group: ,, ;=> error MU_ERR_EMPTY_ADDRESS
127
128 a group: ,,, ;=> error MU_ERR_EMPTY_ADDRESS
129
130 Sam <@[matrix (smtp)], @[nexus: \[node 12\]]:sroberts@[10].[1]> ;=> error MU_ERR_BAD_822_FORMAT
131
132 Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];=> pcount 2
133 1 email <sam@sam>
134 personal <Sam>
135 local-part <sam> domain <sam>
136 route <@[matrix (smtp)]>
137 2 email <sroberts@[10].[1]>
138 local-part <sroberts> domain <[10].[1]>
139
140 lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];=> pcount 3
141 1 email <lo@hi>
142 local-part <lo> domain <hi>
143 2 email <sam@sam>
144 personal <Sam>
145 local-part <sam> domain <sam>
146 route <@[matrix (smtp)]>
147 3 email <sroberts@[10].[1]>
148 local-part <sroberts> domain <[10].[1]>
149
150 Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo=> pcount 3
151 1 email <sam@sam>
152 personal <Sam>
153 local-part <sam> domain <sam>
154 route <@[matrix (smtp)]>
155 2 email <sroberts@[10].[1]>
156 local-part <sroberts> domain <[10].[1]>
157 3 email <hi@lo>
158 local-part <hi> domain <lo>
159
160 lo@hi, Aliens: Sam <@[matrix (smtp)]: sam@sam>, sroberts@[10].[1];, hi@lo=> pcount 4
161 1 email <lo@hi>
162 local-part <lo> domain <hi>
163 2 email <sam@sam>
164 personal <Sam>
165 local-part <sam> domain <sam>
166 route <@[matrix (smtp)]>
167 3 email <sroberts@[10].[1]>
168 local-part <sroberts> domain <[10].[1]>
169 4 email <hi@lo>
170 local-part <hi> domain <lo>
171
172 Sam <@mail2.uniserve.com:sroberts@uniserve.com>=> pcount 1
173 1 email <sroberts@uniserve.com>
174 personal <Sam>
175 local-part <sroberts> domain <uniserve.com>
176 route <@mail2.uniserve.com>
177
178 < (hey) @ (hey, )smtp1.sympatico.ca, mail2.uniserve.com (hoo!):sroberts@uniserve.com>=> error MU_ERR_BAD_822_FORMAT
179
180 hw@570.com (Hardware Support Account)=> pcount 1
181 1 email <hw@570.com>
182 personal <Hardware Support Account>
183 local-part <hw> domain <570.com>
184
185 list-ietf-wg-apps-drums@faerber.muc.de (=?ISO-8859-1?Q?Claus_F=E4rber?=)=> pcount 1
186 1 email <list-ietf-wg-apps-drums@faerber.muc.de>
187 personal <=?ISO-8859-1?Q?Claus_F=E4rber?=>
188 local-part <list-ietf-wg-apps-drums> domain <faerber.muc.de>
189
190 <mutt-dev@mutt.org>(mutt #369), guug-bugs-closed@guug.de (#369)=> pcount 2
191 1 email <mutt-dev@mutt.org>
192 local-part <mutt-dev> domain <mutt.org>
193 2 email <guug-bugs-closed@guug.de>
194 personal <#369>
195 local-part <guug-bugs-closed> domain <guug.de>
196
197 "'Aernoudt Bottemanne'" <Aernoudt.Bottemanne@Informix.com>=> pcount 1
198 1 email <Aernoudt.Bottemanne@Informix.com>
199 personal <'Aernoudt Bottemanne'>
200 local-part <Aernoudt.Bottemanne> domain <Informix.com>
201
202 "'Haag, Ullrich - MBDC'" <Ullrich.Haag@MBDC.com>,=> pcount 1
203 1 email <Ullrich.Haag@MBDC.com>
204 personal <'Haag, Ullrich - MBDC'>
205 local-part <Ullrich.Haag> domain <MBDC.com>
206
207 "'Michael C. Ibarra'" <ibarra@hawk.com>, arl@q7.net, Al <arl@q7.net>=> pcount 3
208 1 email <ibarra@hawk.com>
209 personal <'Michael C. Ibarra'>
210 local-part <ibarra> domain <hawk.com>
211 2 email <arl@q7.net>
212 local-part <arl> domain <q7.net>
213 3 email <arl@q7.net>
214 personal <Al>
215 local-part <arl> domain <q7.net>
216
217 "'Sam Roberts'" <sam@cogent.ca>=> pcount 1
218 1 email <sam@cogent.ca>
219 personal <'Sam Roberts'>
220 local-part <sam> domain <cogent.ca>
221
222 "'paul@pitbull-productions.com'" <paul@pitbull-productions.com>,=> pcount 1
223 1 email <paul@pitbull-productions.com>
224 personal <'paul@pitbull-productions.com'>
225 local-part <paul> domain <pitbull-productions.com>
226
227 "'sam@cogent.ca'" <sam@cogent.ca>, "'sroberts@uniserve.com'"=> error MU_ERR_BAD_822_FORMAT
228
229 "'sroberts\@certicom\.ca'" <sroberts@certicom.ca>=> pcount 1
230 1 email <sroberts@certicom.ca>
231 personal <'sroberts@certicom.ca'>
232 local-part <sroberts> domain <certicom.ca>
233
234 "=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=" <jcmarcos@datavoice.es>=> pcount 1
235 1 email <jcmarcos@datavoice.es>
236 personal <=?iso-8859-1?Q?Juan_Carlos_Marcos_Rodr=EDguez?=>
237 local-part <jcmarcos> domain <datavoice.es>
238
239 "Christian Edward Gruber" <christian.edward.gruber@gmx.net>,=> pcount 1
240 1 email <christian.edward.gruber@gmx.net>
241 personal <Christian Edward Gruber>
242 local-part <christian.edward.gruber> domain <gmx.net>
243
244 "D. J. Bernstein" <"djb- "@cr.yp.to>=> pcount 1
245 1 email <"djb- "@cr.yp.to>
246 personal <D. J. Bernstein>
247 local-part <djb- > domain <cr.yp.to>
248
249 "D. J. Bernstein" <djb@cr.yp.to>, drums@cs.utk.edu=> pcount 2
250 1 email <djb@cr.yp.to>
251 personal <D. J. Bernstein>
252 local-part <djb> domain <cr.yp.to>
253 2 email <drums@cs.utk.edu>
254 local-part <drums> domain <cs.utk.edu>
255
256 "Dave Sill <de5-drums" <de5-drums@sws5.ctd.ornl.gov>=> pcount 1
257 1 email <de5-drums@sws5.ctd.ornl.gov>
258 personal <Dave Sill <de5-drums>
259 local-part <de5-drums> domain <sws5.ctd.ornl.gov>
260
261 "Dave \(work\) Baerg \(E-mail\)" <Dave.Baerg@SUMMedia.com>=> pcount 1
262 1 email <Dave.Baerg@SUMMedia.com>
263 personal <Dave (work) Baerg (E-mail)>
264 local-part <Dave.Baerg> domain <SUMMedia.com>
265
266 "Demian" <damient@wave.home.com>=> pcount 1
267 1 email <damient@wave.home.com>
268 personal <Demian>
269 local-part <damient> domain <wave.home.com>
270
271 "Detailed Revision/Update of Message Standards" <drums@cs.utk.edu>=> pcount 1
272 1 email <drums@cs.utk.edu>
273 personal <Detailed Revision/Update of Message Standards>
274 local-part <drums> domain <cs.utk.edu>
275
276 "Fred" <fprog@__nowhere__.users.sourceforge.net>=> pcount 1
277 1 email <fprog@__nowhere__.users.sourceforge.net>
278 personal <Fred>
279 local-part <fprog> domain <__nowhere__.users.sourceforge.net>
280
281 "Haag, Ullrich - MBDC" <Ullrich.Haag@MBDC.com>=> pcount 1
282 1 email <Ullrich.Haag@MBDC.com>
283 personal <Haag, Ullrich - MBDC>
284 local-part <Ullrich.Haag> domain <MBDC.com>
285
286 "Jacob Palme" <jpalme@dsv.su.se>, <drums@cs.utk.edu>=> pcount 2
287 1 email <jpalme@dsv.su.se>
288 personal <Jacob Palme>
289 local-part <jpalme> domain <dsv.su.se>
290 2 email <drums@cs.utk.edu>
291 local-part <drums> domain <cs.utk.edu>
292
293 "Jakob 'sparky' Kaivo" <jkaivo@elijah.nodomainname.net>=> pcount 1
294 1 email <jkaivo@elijah.nodomainname.net>
295 personal <Jakob 'sparky' Kaivo>
296 local-part <jkaivo> domain <elijah.nodomainname.net>
297
298 "Lee R. Copp" <Lee.R.Copp@MichiganScientific.com>=> pcount 1
299 1 email <Lee.R.Copp@MichiganScientific.com>
300 personal <Lee R. Copp>
301 local-part <Lee.R.Copp> domain <MichiganScientific.com>
302
303 "Lionel Johnson" <ljohnson**nospam**@sterling1.com>=> pcount 1
304 1 email <ljohnson**nospam**@sterling1.com>
305 personal <Lionel Johnson>
306 local-part <ljohnson**nospam**> domain <sterling1.com>
307
308 "Martin \[Keso\] Keseg" <Martin.Keseg@slovakia.sun.com>=> pcount 1
309 1 email <Martin.Keseg@slovakia.sun.com>
310 personal <Martin [Keso] Keseg>
311 local-part <Martin.Keseg> domain <slovakia.sun.com>
312
313 #FIXME: there is no way to send } to the remote program...
314 "]\{ristoph" <news2@kristoph.net>=> pcount 1
315 1 email <news2@kristoph.net>
316 personal <]{ristoph>
317 local-part <news2> domain <kristoph.net>
318
319 "fmartens-2000" <fmartens-2000@planet.nl>=> pcount 1
320 1 email <fmartens-2000@planet.nl>
321 personal <fmartens-2000>
322 local-part <fmartens-2000> domain <planet.nl>
323
324 "g'o'tz ohnesorge" <gohnesorge@lh-computertechnik.de>=> pcount 1
325 1 email <gohnesorge@lh-computertechnik.de>
326 personal <g'o'tz ohnesorge>
327 local-part <gohnesorge> domain <lh-computertechnik.de>
328
329 "gao jie" <jiegi@public.wh.hb.cn>=> pcount 1
330 1 email <jiegi@public.wh.hb.cn>
331 personal <gao jie>
332 local-part <jiegi> domain <public.wh.hb.cn>
333
334 "gnupg-devel@gnupg.org" <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>=> pcount 1
335 1 email <gnupg-devel%gnupg.org@f48.n48.z2.fidonet.org>
336 personal <gnupg-devel@gnupg.org>
337 local-part <gnupg-devel%gnupg.org> domain <f48.n48.z2.fidonet.org>
338
339 "gpg-devel" <gnupg-devel@gnupg.org>=> pcount 1
340 1 email <gnupg-devel@gnupg.org>
341 personal <gpg-devel>
342 local-part <gnupg-devel> domain <gnupg.org>
343
344 "jigang" <jigang@jinglun.com.cn>=> pcount 1
345 1 email <jigang@jinglun.com.cn>
346 personal <jigang>
347 local-part <jigang> domain <jinglun.com.cn>
348
349 "misc@openbsd.org" <misc@openbsd.org>=> pcount 1
350 1 email <misc@openbsd.org>
351 personal <misc@openbsd.org>
352 local-part <misc> domain <openbsd.org>
353
354 "misc@openbsd.org" <misc@openbsd.org>, brian@Awfulhak.org=> pcount 2
355 1 email <misc@openbsd.org>
356 personal <misc@openbsd.org>
357 local-part <misc> domain <openbsd.org>
358 2 email <brian@Awfulhak.org>
359 local-part <brian> domain <Awfulhak.org>
360
361 "mutt-dev @ mutt . orgThomas Roessler" <roessler@does-not-exist.org>=> pcount 1
362 1 email <roessler@does-not-exist.org>
363 personal <mutt-dev @ mutt . orgThomas Roessler>
364 local-part <roessler> domain <does-not-exist.org>
365
366 "zwk@f36.n480.z2.fidonet.org" <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>=> pcount 1
367 1 email <zwk%f36.n480.z2.fidonet.org@f36.n480.z2.fidonet.org>
368 personal <zwk@f36.n480.z2.fidonet.org>
369 local-part <zwk%f36.n480.z2.fidonet.org> domain <f36.n480.z2.fidonet.org>
370
371 'Dan Dall'Acqua' <ddallacqua@noetic.ab.ca>, 'Dave Shyong'=> error MU_ERR_BAD_822_FORMAT
372
373 0xdeadbeef-request@petting-zoo.net=> pcount 1
374 1 email <0xdeadbeef-request@petting-zoo.net>
375 local-part <0xdeadbeef-request> domain <petting-zoo.net>
376
377 102023-00406421@cnxt19932218.conexant.com=> pcount 1
378 1 email <102023-00406421@cnxt19932218.conexant.com>
379 local-part <102023-00406421> domain <cnxt19932218.conexant.com>
380
381 218164.24.43@jobcontrolcenter.com=> pcount 1
382 1 email <218164.24.43@jobcontrolcenter.com>
383 local-part <218164.24.43> domain <jobcontrolcenter.com>
384
385 <0xdeadbeef-request@petting-zoo.net>=> pcount 1
386 1 email <0xdeadbeef-request@petting-zoo.net>
387 local-part <0xdeadbeef-request> domain <petting-zoo.net>
388
389 <>=> pcount 1
390 1 email <>
391
392 <Christia.Roberts@nrc.ca>=> pcount 1
393 1 email <Christia.Roberts@nrc.ca>
394 local-part <Christia.Roberts> domain <nrc.ca>
395
396 <Nick_Shelness@motorcity2.lotus.com>=> pcount 1
397 1 email <Nick_Shelness@motorcity2.lotus.com>
398 local-part <Nick_Shelness> domain <motorcity2.lotus.com>
399
400 <all: >=> error MU_ERR_BAD_822_FORMAT
401
402 <fyi-admin@emyr.net>=> pcount 1
403 1 email <fyi-admin@emyr.net>
404 local-part <fyi-admin> domain <emyr.net>
405
406 <gary.stefanov@medtronic.com>, <HdeVisse@husky.ca>,=> pcount 2
407 1 email <gary.stefanov@medtronic.com>
408 local-part <gary.stefanov> domain <medtronic.com>
409 2 email <HdeVisse@husky.ca>
410 local-part <HdeVisse> domain <husky.ca>
411
412 <gnu-pop-list@nodomainname.net>=> pcount 1
413 1 email <gnu-pop-list@nodomainname.net>
414 local-part <gnu-pop-list> domain <nodomainname.net>
415
416 <mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>=> pcount 1
417 1 email <mutt-dev-owner-sroberts=uniserve.com@ns.gbnet.net>
418 local-part <mutt-dev-owner-sroberts=uniserve.com> domain <ns.gbnet.net>
419
420 =?ISO-8859-1?Q?Kolbj=F8rn_Barmen?= <kolla@nvg.ntnu.no>=> pcount 1
421 1 email <kolla@nvg.ntnu.no>
422 personal <=?ISO-8859-1?Q?Kolbj=F8rn_Barmen?=>
423 local-part <kolla> domain <nvg.ntnu.no>
424
425 =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>=> pcount 1
426 1 email <paf@cisco.com>
427 personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
428 local-part <paf> domain <cisco.com>
429
430 =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@cisco.com>,=> pcount 1
431 1 email <paf@cisco.com>
432 personal <=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=>
433 local-part <paf> domain <cisco.com>
434
435 =?US-ASCII?Q?gary=5Fc?= <gary_c@cunningham-lee.com>=> pcount 1
436 1 email <gary_c@cunningham-lee.com>
437 personal <=?US-ASCII?Q?gary=5Fc?=>
438 local-part <gary_c> domain <cunningham-lee.com>
439
440 =?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>=> pcount 1
441 1 email <0@pervalidus.net>
442 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
443 local-part <0> domain <pervalidus.net>
444
445 =?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier <0@pervalidus.net>,=> pcount 1
446 1 email <0@pervalidus.net>
447 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E?= Meunier>
448 local-part <0> domain <pervalidus.net>
449
450 =?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?= <0@pervalidus.net>=> pcount 1
451 1 email <0@pervalidus.net>
452 personal <=?iso-8859-1?Q?Fr=E9d=E9ric_L_=2E_W_=2E_Meunier?=>
453 local-part <0> domain <pervalidus.net>
454
455 =?iso-8859-1?Q?J=F8rgen_Thomsen?= <jth@postfix.jth.net>=> pcount 1
456 1 email <jth@postfix.jth.net>
457 personal <=?iso-8859-1?Q?J=F8rgen_Thomsen?=>
458 local-part <jth> domain <postfix.jth.net>
459
460 =?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?= <jose@jaimedelamo.eu.org>=> pcount 1
461 1 email <jose@jaimedelamo.eu.org>
462 personal <=?iso-8859-1?Q?Jos=3F_C=2E_Garc=EDa_Sogo?=>
463 local-part <jose> domain <jaimedelamo.eu.org>
464
465 =?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@dna.fi>=> pcount 1
466 1 email <Mikko.Hanninen@dna.fi>
467 personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
468 local-part <Mikko.Hanninen> domain <dna.fi>
469
470 =?iso-8859-1?Q?Mikko_H=E4nninen?= <Mikko.Hanninen@iki.fi>=> pcount 1
471 1 email <Mikko.Hanninen@iki.fi>
472 personal <=?iso-8859-1?Q?Mikko_H=E4nninen?=>
473 local-part <Mikko.Hanninen> domain <iki.fi>
474
475 =?iso-8859-1?Q?R=E9mi_Guyomarch?= <rguyom@321.net>=> pcount 1
476 1 email <rguyom@321.net>
477 personal <=?iso-8859-1?Q?R=E9mi_Guyomarch?=>
478 local-part <rguyom> domain <321.net>
479
480 =?iso-8859-1?Q?Ulf_M=F6ller?= <ulf@fitug.de>=> pcount 1
481 1 email <ulf@fitug.de>
482 personal <=?iso-8859-1?Q?Ulf_M=F6ller?=>
483 local-part <ulf> domain <fitug.de>
484
485 ANDREW MARTIN <amartin@ee.ryerson.ca>=> pcount 1
486 1 email <amartin@ee.ryerson.ca>
487 personal <ANDREW MARTIN>
488 local-part <amartin> domain <ee.ryerson.ca>
489
490 Abhay Ghaisas <abhay@sobolev.does-not-exist.org>, mutt-dev@mutt.org=> pcount 2
491 1 email <abhay@sobolev.does-not-exist.org>
492 personal <Abhay Ghaisas>
493 local-part <abhay> domain <sobolev.does-not-exist.org>
494 2 email <mutt-dev@mutt.org>
495 local-part <mutt-dev> domain <mutt.org>
496
497 Brian Salter-Duke <b_duke@lacebark.ntu.edu.au>=> pcount 1
498 1 email <b_duke@lacebark.ntu.edu.au>
499 personal <Brian Salter-Duke>
500 local-part <b_duke> domain <lacebark.ntu.edu.au>
501
502 Catharine Shyong <shyong@t-iii.com>=> pcount 1
503 1 email <shyong@t-iii.com>
504 personal <Catharine Shyong>
505 local-part <shyong> domain <t-iii.com>
506
507 DRUMS-Last-Call:;=> error MU_ERR_EMPTY_ADDRESS
508
509 Detailed Revision/Update of Message Standards <drums@cs.utk.edu>=> pcount 1
510 1 email <drums@cs.utk.edu>
511 personal <Detailed Revision/Update of Message Standards>
512 local-part <drums> domain <cs.utk.edu>
513
514 Eric Allman <eric+ietf@Sendmail.ORG>=> pcount 1
515 1 email <eric+ietf@Sendmail.ORG>
516 personal <Eric Allman>
517 local-part <eric+ietf> domain <Sendmail.ORG>
518
519 Gary <Gary@e-c-s-uk.com>=> pcount 1
520 1 email <Gary@e-c-s-uk.com>
521 personal <Gary>
522 local-part <Gary> domain <e-c-s-uk.com>
523
524 IETF working group on revision of mail standards <drums@cs.utk.edu>=> pcount 1
525 1 email <drums@cs.utk.edu>
526 personal <IETF working group on revision of mail standards>
527 local-part <drums> domain <cs.utk.edu>
528
529 IETF-Announce:;=> error MU_ERR_EMPTY_ADDRESS
530
531 IETF-Announce:;, drums@cs.utk.edu=> pcount 1
532 1 email <drums@cs.utk.edu>
533 local-part <drums> domain <cs.utk.edu>
534
535 Jean-Baptiste Marchand <Jean-Baptiste.Marchand@epita.fr>=> pcount 1
536 1 email <Jean-Baptiste.Marchand@epita.fr>
537 personal <Jean-Baptiste Marchand>
538 local-part <Jean-Baptiste.Marchand> domain <epita.fr>
539
540 Jonathan Rozes <jrozes+969649116.89117462@vinton.com>=> pcount 1
541 1 email <jrozes+969649116.89117462@vinton.com>
542 personal <Jonathan Rozes>
543 local-part <jrozes+969649116.89117462> domain <vinton.com>
544
545 Jose "C." Garcia Sogo<jose@jaimedelamo.eu.org>=> pcount 1
546 1 email <jose@jaimedelamo.eu.org>
547 personal <Jose C. Garcia Sogo>
548 local-part <jose> domain <jaimedelamo.eu.org>
549
550 Marco d'Itri <md@Linux.IT>=> pcount 1
551 1 email <md@Linux.IT>
552 personal <Marco d'Itri>
553 local-part <md> domain <Linux.IT>
554
555 No_Reply-To@mapquest.com=> pcount 1
556 1 email <No_Reply-To@mapquest.com>
557 local-part <No_Reply-To> domain <mapquest.com>
558
559 OSULLIE@rte.ie, skidswam@hotmail.com, boot=> pcount 3
560 1 email <OSULLIE@rte.ie>
561 local-part <OSULLIE> domain <rte.ie>
562 2 email <skidswam@hotmail.com>
563 local-part <skidswam> domain <hotmail.com>
564 3 email <boot@localhost>
565 local-part <boot>
566
567 Paul Hoffman / IMC <phoffman@imc.org>=> pcount 1
568 1 email <phoffman@imc.org>
569 personal <Paul Hoffman / IMC>
570 local-part <phoffman> domain <imc.org>
571
572 Sam=> pcount 1
573 1 email <Sam@localhost>
574 local-part <Sam>
575
576 Sam Roberts <sam@cogent.ca>=> pcount 1
577 1 email <sam@cogent.ca>
578 personal <Sam Roberts>
579 local-part <sam> domain <cogent.ca>
580
581 Sam_Roberts/Certicom%Certicom@certicom.com=> pcount 1
582 1 email <Sam_Roberts/Certicom%Certicom@certicom.com>
583 local-part <Sam_Roberts/Certicom%Certicom> domain <certicom.com>
584
585 Thomas Roessler <roessler@does-not-exist.org>, 490@bugs.guug.de=> pcount 2
586 1 email <roessler@does-not-exist.org>
587 personal <Thomas Roessler>
588 local-part <roessler> domain <does-not-exist.org>
589 2 email <490@bugs.guug.de>
590 local-part <490> domain <bugs.guug.de>
591
592 Thomas Roessler <roessler@does-not-exist.org>, g10@gnupg.org=> pcount 2
593 1 email <roessler@does-not-exist.org>
594 personal <Thomas Roessler>
595 local-part <roessler> domain <does-not-exist.org>
596 2 email <g10@gnupg.org>
597 local-part <g10> domain <gnupg.org>
598
599 ddickey@ip-12-22-50-150.hqglobal.net=> pcount 1
600 1 email <ddickey@ip-12-22-50-150.hqglobal.net>
601 local-part <ddickey> domain <ip-12-22-50-150.hqglobal.net>
602
603 ktb <x.y.f@home.com>=> pcount 1
604 1 email <x.y.f@home.com>
605 personal <ktb>
606 local-part <x.y.f> domain <home.com>
607
608 mcaustin@eudoramail.com, aposner@usaid.gov, Kieran.O'Leary@anpost.ie,=> pcount 3
609 1 email <mcaustin@eudoramail.com>
610 local-part <mcaustin> domain <eudoramail.com>
611 2 email <aposner@usaid.gov>
612 local-part <aposner> domain <usaid.gov>
613 3 email <Kieran.O'Leary@anpost.ie>
614 local-part <Kieran.O'Leary> domain <anpost.ie>
615
616 rfunk@wks.uts.ohio-state.eduofflinemailer-bounce@dikke.penguin.nl=> error MU_ERR_BAD_822_FORMAT
617
618 root=> pcount 1
619 1 email <root@localhost>
620 local-part <root>
621
622 srr <sam@localhost>=> error MU_ERR_BAD_822_FORMAT
623
624 whom it may concern: ;;whom.it.may.concern: ;=> error MU_ERR_BAD_822_FORMAT
625
626 whom it may concern: mutt-dev@mutt.org, mutt-users@mutt.org;=> pcount 2
627 1 email <mutt-dev@mutt.org>
628 local-part <mutt-dev> domain <mutt.org>
629 2 email <mutt-users@mutt.org>
630 local-part <mutt-users> domain <mutt.org>
631
632 Sergey V. Poznyakoff <gray@gnu.org>=> pcount 1
633 1 email <gray@gnu.org>
634 personal <Sergey V. Poznyakoff>
635 local-part <gray> domain <gnu.org>
636
637 P. D. Q. Bach <bach@somewhere.org>=> pcount 1
638 1 email <bach@somewhere.org>
639 personal <P. D. Q. Bach>
640 local-part <bach> domain <somewhere.org>
641
642 "A bad quote\" <devnull@localhost>=> error MU_ERR_BAD_822_FORMAT
643
644 # NOTE: This file must end with an empty line
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 1 2 3
19 3: 1 2 3
20
21 quoted\ space
22 1: "quoted space"
23
24 a "tab character"
25 2: a tab\tcharacter
26
27 \157\143\164\141\154\40and\x20\x68\x65\x78
28 1: "octal and hex"
29
30 \157\143\164\141\154\40 and \x20\x68\x65\x78
31 3: "octal " and " hex"
32
33 A\x3-\48\39
34 1: A\003-\0048\0039
35
36 # FIXME: Tcl is not able to properly handle binary data, even with
37 # fconfigure -binary, so I had to disable this test
38 #message: ASCII upper part
39 #×ÅÒÈÎÑÑ ÐÏÌÏ×ÉÎÁ ÔÁÂÌÉÃÙ
40 #3: \327\305\322\310\316\321\321 \320\317\314\317\327\311\316\301 \324\301\302\314\311\303\331
41
42 messed up'quotations ' in "a single'" "command" lin"e
43 6: messed "upquotations " in "a single'" command "lin\"e"
44
45 'unbalanced "quote
46 2: 'unbalanced "\"quote"
47
48 unbalanced "quote
49 2: unbalanced "\"quote"
50
51 "
52 1: "\""
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2003, 2006, 2007, 2010 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18
19 =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu> => Success
20 Keith Moore <moore@cs.utk.edu>
21
22 =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk> => Success
23 Keld J\370rn Simonsen <keld@dkuug.dk>
24
25 =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be> => Success
26 Andr\351 Pirard <PIRARD@vm1.ulg.ac.be>
27
28 =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= ... =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= => Success
29 If you can read this yo ... u understand the example.
30
31 # Malformed input string: lacks trailing =. MU 0.6.90 hanged on it.
32 =?koi8-r?B?RndkOiDSxcfJ09TSwcPJ0SDEz83FzsE?= => Success
33 Fwd: \322\305\307\311\323\324\322\301\303
34
35 # NOTE: This file must end with an empty line
36 # EOF
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 \ckoi8-r
19 \eB
20 \o
21 -message 16-bytes string
22 #Cyrillic: åÖÅÄÎÅ×ÎÙÊ ÏÔÞÅÔ
23 \\345\326\305\304\316\305\327\316\331\312\040\317\324\336\305\324=> Success
24 =?koi8-r?B?5dbFxM7F187ZyiDP1N7F1A==?=
25
26 # NOTE: This file must end with an empty line
27 # EOF
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 text/plain; less '%s'; needsterminal
19 entry
20 typefield: text/plain
21 view-command: less '%s'
22 fields[1]: needsterminal
23
24 text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n "$DISPLAY"
25 entry
26 typefield: text/html
27 view-command: gnome-help-browser '%s'
28 fields[1]: nametemplate=%s.html
29 fields[2]: test=test -n "$DISPLAY"
30
31 application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; \
32 copiousoutput; print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
33 entry
34 typefield: application/x-troff-man
35 view-command: /usr/bin/nroff -mandoc -Tlatin1
36 fields[1]: copiousoutput
37 fields[2]: print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
38
39 text/plain; shownonascii iso-8859-1 '%s'; description="Plain ASCII Text"; \
40 test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
41 entry
42 typefield: text/plain
43 view-command: shownonascii iso-8859-1 '%s'
44 fields[1]: description="Plain ASCII Text"
45 fields[2]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
46
47 text/richtext; shownonascii iso-8859-1 -e richtext -p '%s'; \
48 description="Richtext"; copiousoutput; \
49 test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
50 entry
51 typefield: text/richtext
52 view-command: shownonascii iso-8859-1 -e richtext -p '%s'
53 fields[1]: description="Richtext"
54 fields[2]: copiousoutput
55 fields[3]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
56
57 text/enriched; shownonascii iso-8859-1 -e richtext -e -p '%s'; \
58 description="Enriched Text"; \
59 copiousoutput; \
60 test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
61 entry
62 typefield: text/enriched
63 view-command: shownonascii iso-8859-1 -e richtext -e -p '%s'
64 fields[1]: description="Enriched Text"
65 fields[2]: copiousoutput
66 fields[3]: test=test "$(echo %{charset} | tr "[A-Z]" "[a-z]")" = iso-8859-1 -a "$DISPLAY" != ""
67
68 message/partial; showpartial '%s' %{id} %{number} %{total}; description="An incomplete message"
69 entry
70 typefield: message/partial
71 view-command: showpartial '%s' %{id} %{number} %{total}
72 fields[1]: description="An incomplete message"
73
74 message/external-body; showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}; needsterminal; description="A reference to data stored in an external location"; composetyped="extcompose '%s"'
75 entry
76 typefield: message/external-body
77 view-command: showexternal '%s' %{access-type} %{name} %{site} %{directory} %{mode} %{server}
78 fields[1]: needsterminal
79 fields[2]: description="A reference to data stored in an external location"
80 fields[3]: composetyped="extcompose '%s"'
81
82 application/x-dvi; /usr/bin/xdvi '%s'; test=test -n "$DISPLAY"; description=TeX DVI file; nametemplate=%s.dvi
83 entry
84 typefield: application/x-dvi
85 view-command: /usr/bin/xdvi '%s'
86 fields[1]: test=test -n "$DISPLAY"
87 fields[2]: description=TeX DVI file
88 fields[3]: nametemplate=%s.dvi
89
90 text/plain; more '%s'; needsterminal
91 entry
92 typefield: text/plain
93 view-command: more '%s'
94 fields[1]: needsterminal
95
96 text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
97 entry
98 typefield: text/html
99 view-command: /usr/bin/links '%s'
100 fields[1]: needsterminal
101 fields[2]: description=HTML Text
102 fields[3]: nametemplate=%s.html
103
104 text/richtext; richtext '%s'; description="Richtext"; copiousoutput
105 entry
106 typefield: text/richtext
107 view-command: richtext '%s'
108 fields[1]: description="Richtext"
109 fields[2]: copiousoutput
110
111 text/enriched; richtext -e '%s'; description="Enriched Text"; copiousoutput
112 entry
113 typefield: text/enriched
114 view-command: richtext -e '%s'
115 fields[1]: description="Enriched Text"
116 fields[2]: copiousoutput
117
118 text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
119 entry
120 typefield: text/html
121 view-command: /usr/bin/w3m -T text/html '%s'
122 fields[1]: needsterminal
123 fields[2]: description=HTML Text
124 fields[3]: nametemplate=%s.html
125
126 text/html; /usr/bin/links -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
127 entry
128 typefield: text/html
129 view-command: /usr/bin/links -dump '%s'
130 fields[1]: copiousoutput
131 fields[2]: description=HTML Text
132 fields[3]: nametemplate=%s.html
133
134 text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
135 entry
136 typefield: text/html
137 view-command: /usr/bin/lynx -force_html '%s'
138 fields[1]: needsterminal
139 fields[2]: description=HTML Text
140 fields[3]: nametemplate=%s.html
141
142 text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
143 entry
144 typefield: text/html
145 view-command: /usr/bin/w3m -dump -T text/html '%s'
146 fields[1]: copiousoutput
147 fields[2]: description=HTML Text
148 fields[3]: nametemplate=%s.html
149
150 text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
151 entry
152 typefield: text/html
153 view-command: /usr/bin/html2text '%s'
154 fields[1]: copiousoutput
155 fields[2]: description=HTML Text
156
157 text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html
158 entry
159 typefield: text/html
160 view-command: /usr/bin/lynx -dump -force_html '%s'
161 fields[1]: copiousoutput
162 fields[2]: description=HTML Text
163 fields[3]: nametemplate=%s.html
164
165 text/*; less '%s'; needsterminal
166 entry
167 typefield: text/*
168 view-command: less '%s'
169 fields[1]: needsterminal
170
171 text/*; more '%s'; needsterminal
172 entry
173 typefield: text/*
174 view-command: more '%s'
175 fields[1]: needsterminal
176
177 application/x-debian-package; /usr/lib/mime/debian-view '%s'; \
178 needsterminal; description=Debian GNU/Linux Package; \
179 nametemplate=%s.deb
180 entry
181 typefield: application/x-debian-package
182 view-command: /usr/lib/mime/debian-view '%s'
183 fields[1]: needsterminal
184 fields[2]: description=Debian GNU/Linux Package
185 fields[3]: nametemplate=%s.deb
186
187 audio/basic; /usr/lib/mime/playaudio '%s'; description=Basic uLaw Audio; \
188 nametemplate=%s.au
189 entry
190 typefield: audio/basic
191 view-command: /usr/lib/mime/playaudio '%s'
192 fields[1]: description=Basic uLaw Audio
193 fields[2]: nametemplate=%s.au
194
195 # End of Mailcap
1 ## Process this file with GNU Automake to create Makefile.in
2
3 ## Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
4 ##
5 ## GNU Mailutils is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU General Public License as
7 ## published by the Free Software Foundation; either version 3, or (at
8 ## your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
18 ## 02110-1301 USA
19
20 AUTOMAKE_OPTIONS = dejagnu
21 DEJATOOL = mailbox
22 RUNTESTFLAGS =
23 CLEANFILES = *.log
24 test_dirs = lib mailbox
25 EXTRA_DIST = Addrs Argcv Mailcap Mime Urls Encode Decode Encode2047 Decode2047
26
27 dist-hook:
28 here=`cd $(top_builddir)/$(subdir) && pwd`; \
29 srcdir=`cd $(srcdir) && pwd`; \
30 distdir=`cd $(distdir) && pwd`; \
31 for dir in $(test_dirs); \
32 do \
33 cd $$srcdir;\
34 mkdir $$distdir/$$dir;\
35 cd $$dir;\
36 for file in DISTFILES `cat DISTFILES`; do \
37 d=$$srcdir/$$dir; \
38 if test -d $$d/$$file; then \
39 cp -pr $$d/$$file $$distdir/$$dir/$$file; \
40 else \
41 test -f $$distdir/$$dir/$$file \
42 || cp -p $$d/$$file $$distdir/$$dir/$$file || exit; \
43 fi; \
44 done;\
45 done;\
46 cd $$here
47
48 site.exp: Makefile remote.exp
49 @echo 'Making a new site.exp file...'
50 @test ! -f site.bak || rm -f site.bak
51 @echo '## these variables are automatically generated by make ##' > $@-t
52 @echo '# Do not edit here. If you wish to override these values' >> $@-t
53 @echo '# edit the last section' >> $@-t
54 @echo 'set tool $(DEJATOOL)' >> $@-t
55 @echo "set top_srcdir `cd $(top_srcdir); pwd`" >> $@-t
56 @echo "set top_builddir `cd $(top_builddir); pwd`" >> $@-t
57 @echo "set srcdir `cd $(srcdir); pwd`" >> $@-t
58 @echo 'set objdir' `pwd` >> $@-t
59 @echo 'set host_alias "$(host_alias)"' >> $@-t
60 @echo 'set host_triplet $(host_triplet)' >> $@-t
61 @echo 'set target_alias "$(target_alias)"' >> $@-t
62 @echo 'set target_triplet $(target_triplet)' >> $@-t
63 @echo 'set build_alias "$(build_alias)"' >> $@-t
64 @echo 'set build_triplet $(build_triplet)' >> $@-t
65 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
66 @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
67 @test ! -f site.exp || mv site.exp site.bak
68 @mv $@-t site.exp
69
70 remote.exp:;
71 @echo 'Making a new remote.exp file...'
72 @test ! -f remote.bak || rm -f remote.bak
73 @echo '## These variables are used to set up for the remote testing.' >> $@-t
74 @echo '## Please, read file README in this directory for instructions' >> $@-t
75 @echo '## on how to use this file' >> $@-t
76 @echo "set host_board `hostname`" >> $@-t
77 @echo 'set board_info($$host_board,connect) rlogin' >> $@-t
78 @echo 'set board_info($$host_board,shell_prompt) "\\$$ "' >> $@-t
79 @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t
80 @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); pwd`" >> $@-t
81 @echo "set board_info(\$$host_board,srcdir) `cd $(srcdir); pwd`" >> $@-t
82 @echo "set board_info(\$$host_board,objdir) `pwd`" >> $@-t
83 @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t
84 @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); pwd`" >> $@-t
85 @test ! -f remote.exp || mv remote.exp remote.bak
86 @mv $@-t remote.exp
87
88
89 DISTCLEANFILES=*.exp *.log *.sum
90
91 distclean-local:
92 -rm -rf data
1 # This file is part of Mailutils testsuite.
2 # Copyright (C) 2002, 2007, 2008 Free Software Foundation
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # NOTE: Expected lines must be indented with exactly one tab character.
19
20 scheme: => SUCCESS
21 scheme <scheme>
22 user <>
23 passwd <>
24 auth <>
25 host <>
26 port 0
27 path <>
28
29 scheme:/absolute/path => SUCCESS
30 scheme <scheme>
31 user <>
32 passwd <>
33 auth <>
34 host <>
35 port 0
36 path </absolute/path>
37
38 scheme:relative/path => SUCCESS
39 scheme <scheme>
40 user <>
41 passwd <>
42 auth <>
43 host <>
44 port 0
45 path <relative/path>
46
47 scheme:///absolute/path => SUCCESS
48 scheme <scheme>
49 user <>
50 passwd <>
51 auth <>
52 host <>
53 port 0
54 path </absolute/path>
55
56 scheme://%75%73%65%72:%70%61%73%73@%68%6f%73%74 => SUCCESS
57 scheme <scheme>
58 user <user>
59 passwd <pass>
60 auth <>
61 host <host>
62 port 0
63 path <>
64
65 ftp://user:pass@host//a/path => SUCCESS
66 scheme <ftp>
67 user <user>
68 passwd <pass>
69 auth <>
70 host <host>
71 port 0
72 path </a/path>
73
74 ftp://:pass@host//a/path => SUCCESS
75 scheme <ftp>
76 user <>
77 passwd <pass>
78 auth <>
79 host <host>
80 port 0
81 path </a/path>
82
83 ftp://user:@host//a/path => SUCCESS
84 scheme <ftp>
85 user <user>
86 passwd <>
87 auth <>
88 host <host>
89 port 0
90 path </a/path>
91
92 ftp://user:pass@//a/path => SUCCESS
93 scheme <ftp>
94 user <user>
95 passwd <pass>
96 auth <>
97 host <>
98 port 0
99 path </a/path>
100
101 ftp://user:@//a/path => SUCCESS
102 scheme <ftp>
103 user <user>
104 passwd <>
105 auth <>
106 host <>
107 port 0
108 path </a/path>
109
110 ftp://:@host//a/path => SUCCESS
111 scheme <ftp>
112 user <>
113 passwd <>
114 auth <>
115 host <host>
116 port 0
117 path </a/path>
118
119 ftp://:pass@//a/path => SUCCESS
120 scheme <ftp>
121 user <>
122 passwd <pass>
123 auth <>
124 host <>
125 port 0
126 path </a/path>
127
128 ftp://:@//a/path => SUCCESS
129 scheme <ftp>
130 user <>
131 passwd <>
132 auth <>
133 host <>
134 port 0
135 path </a/path>
136
137 ftp://://a/path => SUCCESS
138 scheme <ftp>
139 user <>
140 passwd <>
141 auth <>
142 host <>
143 port 0
144 path </a/path>
145
146 ftp://@//a/path => SUCCESS
147 scheme <ftp>
148 user <>
149 passwd <>
150 auth <>
151 host <>
152 port 0
153 path </a/path>
154
155 ftp:/a/path => SUCCESS
156 scheme <ftp>
157 user <>
158 passwd <>
159 auth <>
160 host <>
161 port 0
162 path </a/path>
163
164 ftp://user:pass@host/a/path => SUCCESS
165 scheme <ftp>
166 user <user>
167 passwd <pass>
168 auth <>
169 host <host>
170 port 0
171 path <a/path>
172
173 ftp://:pass@host/a/path => SUCCESS
174 scheme <ftp>
175 user <>
176 passwd <pass>
177 auth <>
178 host <host>
179 port 0
180 path <a/path>
181
182 ftp://user:@host/a/path => SUCCESS
183 scheme <ftp>
184 user <user>
185 passwd <>
186 auth <>
187 host <host>
188 port 0
189 path <a/path>
190
191 ftp://user:pass@/a/path => SUCCESS
192 scheme <ftp>
193 user <user>
194 passwd <pass>
195 auth <>
196 host <>
197 port 0
198 path <a/path>
199
200 ftp://user:@/a/path => SUCCESS
201 scheme <ftp>
202 user <user>
203 passwd <>
204 auth <>
205 host <>
206 port 0
207 path <a/path>
208
209 ftp://:@host/a/path => SUCCESS
210 scheme <ftp>
211 user <>
212 passwd <>
213 auth <>
214 host <host>
215 port 0
216 path <a/path>
217
218 ftp://:pass@/a/path => SUCCESS
219 scheme <ftp>
220 user <>
221 passwd <pass>
222 auth <>
223 host <>
224 port 0
225 path <a/path>
226
227 ftp://:@/a/path => SUCCESS
228 scheme <ftp>
229 user <>
230 passwd <>
231 auth <>
232 host <>
233 port 0
234 path <a/path>
235
236 ftp://:/a/path => SUCCESS
237 scheme <ftp>
238 user <>
239 passwd <>
240 auth <>
241 host <>
242 port 0
243 path <a/path>
244
245 ftp://@/a/path => SUCCESS
246 scheme <ftp>
247 user <>
248 passwd <>
249 auth <>
250 host <>
251 port 0
252 path <a/path>
253
254 ftp:///a/path => SUCCESS
255 scheme <ftp>
256 user <>
257 passwd <>
258 auth <>
259 host <>
260 port 0
261 path </a/path>
262
263 pop://pop.example.net => SUCCESS
264 scheme <pop>
265 user <>
266 passwd <>
267 auth <>
268 host <pop.example.net>
269 port 0
270 path <>
271
272 pop://user@pop.example.net => SUCCESS
273 scheme <pop>
274 user <user>
275 passwd <>
276 auth <>
277 host <pop.example.net>
278 port 0
279 path <>
280
281 pop://user:passwd@pop.example.net => SUCCESS
282 scheme <pop>
283 user <user>
284 passwd <passwd>
285 auth <>
286 host <pop.example.net>
287 port 0
288 path <>
289
290 pop://user;auth=*@pop.example.net => SUCCESS
291 scheme <pop>
292 user <user>
293 passwd <>
294 auth <*>
295 host <pop.example.net>
296 port 0
297 path <>
298
299 pop://pop.example.net:111 => SUCCESS
300 scheme <pop>
301 user <>
302 passwd <>
303 auth <>
304 host <pop.example.net>
305 port 111
306 path <>
307
308 pop://user@pop.example.net:111 => SUCCESS
309 scheme <pop>
310 user <user>
311 passwd <>
312 auth <>
313 host <pop.example.net>
314 port 111
315 path <>
316
317 pop://user:passwd@pop.example.net:111 => SUCCESS
318 scheme <pop>
319 user <user>
320 passwd <passwd>
321 auth <>
322 host <pop.example.net>
323 port 111
324 path <>
325
326 pop://user;auth=*@pop.example.net:111 => SUCCESS
327 scheme <pop>
328 user <user>
329 passwd <>
330 auth <*>
331 host <pop.example.net>
332 port 111
333 path <>
334
335 imap://imap.example.net => SUCCESS
336 scheme <imap>
337 user <>
338 passwd <>
339 auth <>
340 host <imap.example.net>
341 port 0
342 path <>
343
344 imap://user@imap.example.net => SUCCESS
345 scheme <imap>
346 user <user>
347 passwd <>
348 auth <>
349 host <imap.example.net>
350 port 0
351 path <>
352
353 imap://user:passwd@imap.example.net => SUCCESS
354 scheme <imap>
355 user <user>
356 passwd <passwd>
357 auth <>
358 host <imap.example.net>
359 port 0
360 path <>
361
362 imap://user;auth=*@imap.example.net => SUCCESS
363 scheme <imap>
364 user <user>
365 passwd <>
366 auth <*>
367 host <imap.example.net>
368 port 0
369 path <>
370
371 imap://imap.example.net:111 => SUCCESS
372 scheme <imap>
373 user <>
374 passwd <>
375 auth <>
376 host <imap.example.net>
377 port 111
378 path <>
379
380 imap://user@imap.example.net:111 => SUCCESS
381 scheme <imap>
382 user <user>
383 passwd <>
384 auth <>
385 host <imap.example.net>
386 port 111
387 path <>
388
389 imap://user:passwd@imap.example.net:111 => SUCCESS
390 scheme <imap>
391 user <user>
392 passwd <passwd>
393 auth <>
394 host <imap.example.net>
395 port 111
396 path <>
397
398 imap://user;auth=*@imap.example.net:111 => SUCCESS
399 scheme <imap>
400 user <user>
401 passwd <>
402 auth <*>
403 host <imap.example.net>
404 port 111
405 path <>
406
407 imap://imap.example.net/mbox => SUCCESS
408 scheme <imap>
409 user <>
410 passwd <>
411 auth <>
412 host <imap.example.net>
413 port 0
414 path <mbox>
415
416 imap://user@imap.example.net/mbox => SUCCESS
417 scheme <imap>
418 user <user>
419 passwd <>
420 auth <>
421 host <imap.example.net>
422 port 0
423 path <mbox>
424
425 imap://user:passwd@imap.example.net/mbox => SUCCESS
426 scheme <imap>
427 user <user>
428 passwd <passwd>
429 auth <>
430 host <imap.example.net>
431 port 0
432 path <mbox>
433
434 imap://user;auth=*@imap.example.net/mbox => SUCCESS
435 scheme <imap>
436 user <user>
437 passwd <>
438 auth <*>
439 host <imap.example.net>
440 port 0
441 path <mbox>
442
443 imap://imap.example.net:111/mbox => SUCCESS
444 scheme <imap>
445 user <>
446 passwd <>
447 auth <>
448 host <imap.example.net>
449 port 111
450 path <mbox>
451
452 imap://user@imap.example.net:111/mbox => SUCCESS
453 scheme <imap>
454 user <user>
455 passwd <>
456 auth <>
457 host <imap.example.net>
458 port 111
459 path <mbox>
460
461 imap://user:passwd@imap.example.net:111/mbox => SUCCESS
462 scheme <imap>
463 user <user>
464 passwd <passwd>
465 auth <>
466 host <imap.example.net>
467 port 111
468 path <mbox>
469
470 imap://user;auth=*@imap.example.net:111/mbox => SUCCESS
471 scheme <imap>
472 user <user>
473 passwd <>
474 auth <*>
475 host <imap.example.net>
476 port 111
477 path <mbox>
478
479 imap://imap.example.net/mbox/user@host => SUCCESS
480 scheme <imap>
481 user <imap.example.net/mbox/user>
482 passwd <>
483 auth <>
484 host <host>
485 port 0
486 path <>
487
488 imap://user@imap.example.net/mbox/user@host => SUCCESS
489 scheme <imap>
490 user <user>
491 passwd <>
492 auth <>
493 host <imap.example.net>
494 port 0
495 path <mbox/user@host>
496
497 imap://user:passwd@imap.example.net/mbox/user@host => SUCCESS
498 scheme <imap>
499 user <user>
500 passwd <passwd>
501 auth <>
502 host <imap.example.net>
503 port 0
504 path <mbox/user@host>
505
506 imap://user;auth=*@imap.example.net/mbox/user@host => SUCCESS
507 scheme <imap>
508 user <user>
509 passwd <>
510 auth <*>
511 host <imap.example.net>
512 port 0
513 path <mbox/user@host>
514
515 imap://imap.example.net:111/mbox/user@host => SUCCESS
516 scheme <imap>
517 user <imap.example.net>
518 passwd <111/mbox/user>
519 auth <>
520 host <host>
521 port 0
522 path <>
523
524 imap://user@imap.example.net:111/mbox/user@host => SUCCESS
525 scheme <imap>
526 user <user>
527 passwd <>
528 auth <>
529 host <imap.example.net>
530 port 111
531 path <mbox/user@host>
532
533 imap://user:passwd@imap.example.net:111/mbox/user@host => SUCCESS
534 scheme <imap>
535 user <user>
536 passwd <passwd>
537 auth <>
538 host <imap.example.net>
539 port 111
540 path <mbox/user@host>
541
542 imap://user;auth=*@imap.example.net:111/mbox/user@host => SUCCESS
543 scheme <imap>
544 user <user>
545 passwd <>
546 auth <*>
547 host <imap.example.net>
548 port 111
549 path <mbox/user@host>
550
551 ftp://ftp.example.org/mbox/user%40host => SUCCESS
552 scheme <ftp>
553 user <>
554 passwd <>
555 auth <>
556 host <ftp.example.org>
557 port 0
558 path <mbox/user@host>
559
560 ftp://ftp.example.org:111/mbox/user%40host => SUCCESS
561 scheme <ftp>
562 user <>
563 passwd <>
564 auth <>
565 host <ftp.example.org>
566 port 111
567 path <mbox/user@host>
568
569 ftp://ftp.example.org:111/mbox/user%40host;type=pass => SUCCESS
570 scheme <ftp>
571 user <>
572 passwd <>
573 auth <>
574 host <ftp.example.org>
575 port 111
576 path <mbox/user@host>
577 param[0] <type=pass>
578
579 mbox:/var/spool/mail;type=index;param=2;user=gray => SUCCESS
580 scheme <mbox>
581 user <>
582 passwd <>
583 auth <>
584 host <>
585 port 0
586 path </var/spool/mail>
587 param[0] <type=index>
588 param[1] <param=2>
589 param[2] <user=gray>
590
591 mbox:///var/spool/mail;type=index;param=2;user=gray => SUCCESS
592 scheme <mbox>
593 user <>
594 passwd <>
595 auth <>
596 host <>
597 port 0
598 path </var/spool/mail>
599 param[0] <type=index>
600 param[1] <param=2>
601 param[2] <user=gray>
602
603 http:///gnu.org.ua/home/gray?prog&arg1&arg2
604 scheme <http>
605 user <>
606 passwd <>
607 auth <>
608 host <gnu.org.ua>
609 port 0
610 path <home/gray>
611 query[0] <prog>
612 query[1] <arg1>
613 query[2] <arg2>
614
615 http:///gnu.org.ua/home/gray;foo=bar;baz=qux?prog&arg%201&arg%202
616 scheme <http>
617 user <>
618 passwd <>
619 auth <>
620 host <gnu.org.ua>
621 port 0
622 path <home/gray>
623 param[0] <foo=bar>
624 param[1] <baz=qux>
625 query[0] <prog>
626 query[1] <arg 1>
627 query[2] <arg 2>
628
629 # NOTE: This file must end with an empty line
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 source $top_srcdir/testsuite/lib/mailutils.exp
21
22 mu_init
23
24 proc mailbox_run {args} {
25 global verbose
26 global expect_out
27
28 set sw ""
29 for {set i 0} {$i < [llength $args]} {incr i} {
30 set a [lindex $args $i]
31 if {"$a" == "-mail-spool"} {
32 if [info exists host_board] {
33 if [board_info $host_board exists top_srcdir] {
34 append sw "--set mailbox.mail-spool=\"'[board_info $host_board top_srcdir]/mail/testsuite/spool'\""
35 }
36 }
37 if {![info exists init_spool]} {
38 set init_spool 1
39 }
40 } elseif {"$a" == "-reuse-spool"} {
41 set init_spool 0
42 } else {
43 break
44 }
45 }
46
47 if [info exists init_spool] {
48 mu_prepare_spools
49 }
50
51 set args "[lrange $args $i end] $sw"
52
53 verbose "Spawning $args"
54
55 set res [remote_spawn host $args]
56 if { $res < 0 || $res == "" } {
57 perror "Spawning $args failed."
58 return 1;
59 }
60
61 return 0
62 }
63
64 proc mailbox_send { string } {
65 return [mu_send "$string"]
66 }
67
68 # mailbox_test [-message MESSAGE][-default (FAIL|XFAIL)]
69 # COMMAND [-pattern PATTERN-LIST][PATTERN...]
70 # COMMAND - Command to send.
71 # PATTERN - Sequence to expect in return.
72 # MESSAGE - [optional] message to output
73 proc mailbox_test { args } {
74 global verbose
75 global suppress_flag;
76 upvar timeout timeout
77
78 set default ""
79 set message ""
80 for {set i 0} {$i < [llength $args]} {incr i} {
81 set a [lindex $args $i]
82 if {"$a" == "-default"} {
83 incr i
84 set default [lindex $args $i]
85 } elseif {"$a" == "-message"} {
86 incr i
87 set message [lindex $args $i]
88 } elseif {"$a" == "-pattern"} {
89 incr i
90 set pattern [lindex $args $i]
91 } else {
92 set args [lrange $args $i end]
93 break
94 }
95 }
96
97 if {"$message" == ""} {
98 set message [lindex $args 0]
99 }
100
101 if $verbose>2 then {
102 send_user "Message is \"$message\"\n"
103 }
104 set command [lindex $args 0]
105 if {[llength $args] >= 2} {
106 set pattern [lrange $args 1 end]
107 }
108
109 if [info exists pattern] {
110 set result [mu_test $command $pattern]
111 } else {
112 set result [mu_test $command]
113 }
114
115 if {$result == 0} {
116 pass "$message"
117 } elseif {$result == 1} {
118 if { "$default" == "" || "$default" != "FAIL" } {
119 fail "$message"
120 } else {
121 xfail "$message"
122 set result 0
123 }
124 } elseif {$result == -2} {
125 fail "$message (timeout)"
126 } elseif {$result == -3} {
127 fail "$message (eof)"
128 } else {
129 fail "$message"
130 }
131 return $result
132 }
133
134 proc mailbox_prog_start {cmd} {
135 global verbose
136 global MU_TOOL
137 global MU_TOOL_FLAGS
138 global mailbox_prog_prompt
139 global expect_out
140 global mailbox_spawn_id
141
142 verbose "Spawning $cmd"
143
144 set mailbox_spawn_id [remote_spawn host $cmd]
145 if { $mailbox_spawn_id < 0 || $mailbox_spawn_id == "" } {
146 perror "Spawning $cmd failed."
147 return 1;
148 }
149
150 mu_expect 360 {
151 -re "\[\r\n\]?${mailbox_prog_prompt}$" {
152 verbose "program initialized."
153 }
154 default {
155 perror "program not initialized"
156 return 1
157 }
158 }
159 return 0
160 }
161
162 proc mailbox_prog_send { string } {
163 return [mu_send "$string"]
164 }
165
166 proc mailbox_prog_command { cmd } {
167 return [mu_command $cmd]
168 }
169
170 proc mailbox_prog_stop {} {
171 verbose "Stopping program"
172 remote_close host
173
174 }
175
176 # mailbox_prog_test [-message MESSAGE][-default (FAIL|XFAIL)][-noprompt]
177 # COMMAND PATTERN [PATTERN...]
178 # COMMAND - Command to send.
179 # PATTERN - Sequence to expect in return.
180 # MESSAGE - [optional] message to output
181 proc mailbox_prog_test { args } {
182 global verbose
183 global mailbox_prog_prompt
184 global suppress_flag;
185 upvar timeout timeout
186
187 set default ""
188 set message ""
189 set wait_for_prompt 1
190 for {set i 0} {$i < [llength $args]} {incr i} {
191 set a [lindex $args $i]
192 if {"$a" == "-default"} {
193 set default [lindex $args [expr $i + 1]]
194 incr i
195 } elseif {"$a" == "-message"} {
196 set message [lindex $args [expr $i + 1]]
197 incr i
198 } elseif {"$a" == "-noprompt"} {
199 set wait_for_prompt 0
200 } else {
201 set args [lrange $args $i end]
202 break
203 }
204 }
205
206 if {"$message" == ""} {
207 set message [lindex $args 0]
208 }
209
210 if $verbose>2 then {
211 send_user "Message is \"$message\"\n"
212 }
213 set command [lindex $args 0]
214 set pattern [lrange $args 1 end]
215 set result [mu_test $command $pattern]
216 if {$wait_for_prompt} {
217 mu_expect 30 {
218 -re "\[\r\n\]?${mailbox_prog_prompt}$" {}
219 default {
220 perror "prog not initialized"
221 return 1
222 }
223 }
224 }
225
226 if {$result == 0} {
227 pass "$message"
228 } elseif {$result == 1} {
229 if { "$default" == "" || "$default" != "FAIL" } {
230 fail "$message"
231 } else {
232 xfail "$message"
233 set result 0
234 }
235 } elseif {$result == -2} {
236 fail "$message (timeout)"
237 } elseif {$result == -3} {
238 fail "$message (eof)"
239 } else {
240 fail "$message"
241 }
242 return $result
243 }
1 address.exp
2 argcv.exp
3 base64.exp
4 decode2047.exp
5 encode2047.exp
6 list.exp
7 mailcap.exp
8 mime.exp
9 url.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mailbox_run ${top_builddir}/examples/addr
21
22 set chan [open ${srcdir}/Addrs r]
23
24 set command ""
25 for {gets $chan line} {![eof $chan]} {gets $chan line} {
26 switch -regexp -- "$line" {
27 "^#.*" { }
28 "^[^ \t].*=>.*" {
29 regexp "(.*)=>.*" $line dummy command
30 set pattern [list $line]
31 }
32 "^\$" {
33 if {$command != ""} {
34 mailbox_test -pattern $pattern $command
35 set command ""
36 }
37 }
38 default {
39 if [info exist pattern] {
40 set pattern [concat $pattern [list $line]]
41 }
42 }
43 }
44 }
45
46 close $chan
47
48 # end of address.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mailbox_run ${top_builddir}/examples/argcv
21
22 set chan [open ${srcdir}/Argcv r]
23
24 set command ""
25 set message ""
26 for {gets $chan line} {![eof $chan]} {gets $chan line} {
27 switch -regexp -- "$line" {
28 "^#.*" { }
29 "^[ \t]*\$" { }
30 "message:" {
31 regexp "message:\[ \t\]*(.*)" $line dummy message
32 }
33 default {
34 if {$command == ""} {
35 set command $line
36 } else {
37 if {$message != ""} {
38 mailbox_test -message $message -pattern [list $line] $command
39 set message ""
40 } else {
41 mailbox_test -pattern [list $line] $command
42 }
43 set command ""
44 }
45 }
46 }
47 }
48
49 if {$command != ""} {
50 fail "Malformed input file ${srcdir}/Argcv"
51 }
52
53 close $chan
54
55 # end of argcv.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 set MU_TOOL ${top_builddir}/examples/base64
21 set MU_TOOL_FLAGS ""
22
23 mu_exec -message "encode" -arg -i${srcdir}/Encode \
24 "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4"\
25 "OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3Bx"\
26 "cnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmq"\
27 "q6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj"\
28 "5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w=="
29
30 ## Expect chokes on binary data, so let's switch base64 to printable
31 ## octal output.
32 ## The -l0 option ensures that the output is not split by inserting
33 ## additional newlines.
34 mu_exec -message "decode" -arg -i${srcdir}/Decode -arg -dpl0 \
35 "\\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377"
36
37 # End of base64.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2003, 2006, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mailbox_run ${top_builddir}/examples/decode2047 -p
21
22 set chan [open ${srcdir}/Decode2047 r]
23
24 set command ""
25 for {gets $chan line} {![eof $chan]} {gets $chan line} {
26 switch -regexp -- "$line" {
27 "^#.*" { }
28 "^[^ \t].*=>.*" {
29 regexp "(.*)=>.*" $line dummy command
30 set pattern [list $line]
31 }
32 "^\$" {
33 if {$command != ""} {
34 verbose "COMMAND $command"
35 verbose "PATTERN $pattern"
36 mailbox_test -pattern $pattern $command
37 set command ""
38 }
39 }
40 default {
41 if [info exist pattern] {
42 set pattern [concat $pattern [list $line]]
43 }
44 }
45 }
46 }
47
48 close $chan
49
50 # end of decode2047.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mailbox_run ${top_builddir}/examples/encode2047
21
22 set chan [open ${srcdir}/Encode2047 r]
23
24 set command ""
25 set message ""
26 for {gets $chan line} {![eof $chan]} {gets $chan line} {
27 switch -regexp -- "$line" {
28 "^#.*" { }
29 "-message.*" {
30 regexp -- "-message (.*)" $line dummy message
31 }
32 "^\\\\\[^\\\\\]" {
33 mu_command $line
34 }
35 "^[^ \t].*=>.*" {
36 regexp "(.*)=>.*" $line dummy command
37 set pattern [list $line]
38 }
39 "^\$" {
40 if {$command != ""} {
41 verbose "COMMAND $command"
42 verbose "PATTERN $pattern"
43 if {$message != ""} {
44 mailbox_test -message $message -pattern $pattern $command
45 } else {
46 mailbox_test -pattern $pattern $command
47 }
48 set command ""
49 set message ""
50 }
51 }
52 default {
53 if [info exist pattern] {
54 set pattern [concat $pattern [list $line]]
55 }
56 }
57 }
58 }
59
60 close $chan
61
62 # end of encode2037.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2003, 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 set current_text [list "NULL" "NULL" "NULL" "NULL"]
21 set current_iter 0
22
23 proc make_promt {} {
24 global current_iter
25 global current_text
26 global mailbox_prog_prompt
27
28 set mailbox_prog_prompt "${current_iter}:\\([lindex $current_text $current_iter]\\)> "
29 }
30
31 proc prompt_text {text} {
32 global current_iter
33 global current_text
34
35 set current_text [lreplace $current_text $current_iter $current_iter $text]
36 make_promt
37 }
38
39 proc prompt_iterator {iter} {
40 global current_iter
41
42 set current_iter $iter
43 make_promt
44 }
45
46 prompt_iterator 0
47 prompt_text "NULL"
48
49 mailbox_prog_start "${top_builddir}/examples/listop"
50
51 mailbox_prog_command "add en to tre fire fem"
52 mailbox_prog_test "print" \
53 "# items: 5" \
54 "en" \
55 "to" \
56 "tre" \
57 "fire" \
58 "fem"
59
60 prompt_text "en"
61 mailbox_prog_test "next"
62
63 prompt_text "tre"
64 mailbox_prog_test "next 2"
65
66 prompt_iterator 1
67 prompt_text "en"
68 mailbox_prog_test "iter 1"
69
70 prompt_text "to"
71 mailbox_prog_test "find to"
72
73 mailbox_prog_test "del tre fire"
74
75 prompt_text "fem"
76 mailbox_prog_test "next"
77
78 prompt_iterator 0
79 prompt_text "fem"
80 mailbox_prog_test "iter 0"
81 mailbox_prog_test "print" \
82 "# items: 3" \
83 "en" \
84 "to" \
85 "fem"
86
87 mailbox_prog_command "prep jeden dwa trzy cztery"
88
89 mailbox_prog_test "print" \
90 "# items: 7" \
91 "cztery" \
92 "trzy" \
93 "dwa" \
94 "jeden" \
95 "en" \
96 "to" \
97 "fem"
98
99 prompt_text "cztery"
100 mailbox_prog_test "first"
101
102 prompt_text "trzy"
103 mailbox_prog_test "del cztery"
104
105 prompt_text "3"
106 mailbox_prog_test "repl trzy 3"
107
108 prompt_iterator 1
109 mailbox_prog_test "iter 1"
110
111 prompt_text "3"
112 mailbox_prog_test "next 2"
113
114 mailbox_prog_command "ins jeden un"
115 mailbox_prog_test "print" \
116 "# items: 7" \
117 "3" \
118 "dwa" \
119 "jeden" \
120 "un" \
121 "en" \
122 "to" \
123 "fem"
124
125 mailbox_prog_command "ins before jeden zero"
126 mailbox_prog_test "print" \
127 "# items: 8" \
128 "3" \
129 "dwa" \
130 "zero" \
131 "jeden" \
132 "un" \
133 "en" \
134 "to" \
135 "fem"
136
137 prompt_text "un"
138 mailbox_prog_test "find un"
139
140 mailbox_prog_command "ins before un cero"
141 mailbox_prog_command "ins un dos"
142
143 mailbox_prog_test "print" \
144 "# items: 10" \
145 "3" \
146 "dwa" \
147 "zero" \
148 "jeden" \
149 "cero" \
150 "un" \
151 "dos" \
152 "en" \
153 "to" \
154 "fem"
155
156 mailbox_prog_command "ins before 3 1"
157 mailbox_prog_test "print" \
158 "# items: 11" \
159 "1" \
160 "3" \
161 "dwa" \
162 "zero" \
163 "jeden" \
164 "cero" \
165 "un" \
166 "dos" \
167 "en" \
168 "to" \
169 "fem"
170
171 mailbox_prog_command "ins before 3 2"
172 mailbox_prog_test "print" \
173 "# items: 12" \
174 "1" \
175 "2" \
176 "3" \
177 "dwa" \
178 "zero" \
179 "jeden" \
180 "cero" \
181 "un" \
182 "dos" \
183 "en" \
184 "to" \
185 "fem"
186
187 mailbox_prog_command "ins 3 4 5 6"
188 mailbox_prog_test "print" \
189 "# items: 15" \
190 "1" \
191 "2" \
192 "3" \
193 "4" \
194 "5" \
195 "6" \
196 "dwa" \
197 "zero" \
198 "jeden" \
199 "cero" \
200 "un" \
201 "dos" \
202 "en" \
203 "to" \
204 "fem"
205
206 mailbox_prog_command "ins before dwa zero jeden"
207 mailbox_prog_test "print" \
208 "# items: 17" \
209 "1" \
210 "2" \
211 "3" \
212 "4" \
213 "5" \
214 "6" \
215 "zero" \
216 "jeden" \
217 "dwa" \
218 "zero" \
219 "jeden" \
220 "cero" \
221 "un" \
222 "dos" \
223 "en" \
224 "to" \
225 "fem"
226
227 mailbox_prog_test "ictl tell" "12"
228
229 prompt_text "dos"
230 mailbox_prog_test "ictl del"
231
232 prompt_text "dos"
233 mailbox_prog_test "next"
234
235 mailbox_prog_test "print" \
236 "# items: 16" \
237 "1" \
238 "2" \
239 "3" \
240 "4" \
241 "5" \
242 "6" \
243 "zero" \
244 "jeden" \
245 "dwa" \
246 "zero" \
247 "jeden" \
248 "cero" \
249 "dos" \
250 "en" \
251 "to" \
252 "fem"
253
254 mailbox_prog_test "ictl ins seis"
255
256 mailbox_prog_test "print" \
257 "# items: 17" \
258 "1" \
259 "2" \
260 "3" \
261 "4" \
262 "5" \
263 "6" \
264 "zero" \
265 "jeden" \
266 "dwa" \
267 "zero" \
268 "jeden" \
269 "cero" \
270 "dos" \
271 "seis" \
272 "en" \
273 "to" \
274 "fem"
275
276 mailbox_prog_test "ictl ins tres quatro cinco"
277
278 mailbox_prog_test "print" \
279 "# items: 20" \
280 "1" \
281 "2" \
282 "3" \
283 "4" \
284 "5" \
285 "6" \
286 "zero" \
287 "jeden" \
288 "dwa" \
289 "zero" \
290 "jeden" \
291 "cero" \
292 "dos" \
293 "tres" \
294 "quatro" \
295 "cinco" \
296 "seis" \
297 "en" \
298 "to" \
299 "fem"
300
301 prompt_text "tres"
302 mailbox_prog_test "next"
303
304 mailbox_prog_test "ictl dir" "forwards"
305
306 mailbox_prog_test "ictl dir backwards"
307
308 prompt_text "dos"
309 mailbox_prog_test "next"
310
311 prompt_text "dwa"
312 mailbox_prog_test "next 4"
313
314 prompt_text "jeden"
315 mailbox_prog_test "ictl del"
316
317 mailbox_prog_test "next"
318
319 prompt_text "zero"
320 mailbox_prog_test "next"
321
322 mailbox_prog_test "ictl dir forwards"
323
324 prompt_text "jeden"
325 mailbox_prog_test "next"
326
327 mailbox_prog_send "quit"
328 mailbox_prog_stop
329
330 # End of list.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mu_prepare_spools
21
22 set mailcapfile ${MU_DATA_DIR}/mailcap
23 set chan [open ${srcdir}/Mailcap r]
24 set outchan [open "$mailcapfile" w]
25
26 set command ""
27 set state 0
28 set entry 0
29 set pattern [list]
30
31 for {gets $chan line} {![eof $chan]} {gets $chan line} {
32 if {$state == 0} {
33 switch -regexp -- "$line" {
34 "^#.*" { }
35 "^entry" {
36 set state 1
37 incr entry
38 lappend pattern "entry\[${entry}\]"
39 }
40 default {
41 puts $outchan $line
42 }
43 }
44 } else {
45 switch -regexp -- "$line" {
46 "^#.*" { }
47 "^\$" {
48 lappend pattern ""
49 set state 0
50 }
51 default {
52 lappend pattern $line
53 }
54 }
55 }
56 }
57
58 if {$state == 1} {
59 lappend pattern ""
60 }
61
62 close $outchan
63 close $chan
64
65 set MU_TOOL ${top_builddir}/examples/mailcap
66 set MU_TOOL_FLAGS ""
67
68 verbose "INVOKE $pattern"
69 eval mu_exec -message "mailcap" -arg "$mailcapfile" $pattern
70
71 # end of mailcap.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 set MU_TOOL "${top_builddir}/examples/mimetest"
21 set MU_TOOL_FLAGS "-i 0 -p $MU_SPOOL_DIR/mbox1"
22
23 mu_prepare_spools
24
25 set chan [open ${srcdir}/Mime r]
26
27 set pattern [list]
28 for {gets $chan line} {![eof $chan]} {gets $chan line} {
29 switch -regexp -- "$line" {
30 "^#.*" { }
31 default { set pattern [concat $pattern [list $line]] }
32 }
33 }
34
35 mu_exec -retcode 0 -message "MIME" -pattern $pattern
36
37 close $chan
38
39 # end of mime.exp
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301 USA.
19
20 mailbox_run ${top_builddir}/examples/url-parse
21
22 set chan [open ${srcdir}/Urls r]
23
24 set command ""
25 for {gets $chan line} {![eof $chan]} {gets $chan line} {
26 verbose "LINE: $line"
27 switch -regexp -- "$line" {
28 "^#.*" { }
29 "^[^ \t].*=>.*" {
30 regexp "(.*\[^ \t\])\[ \t\]*=>.*" $line dummy command
31 verbose "COMMAND: \"$command\""
32 set pattern [list $line]
33 }
34 "^\$" {
35 if {$command != ""} {
36 mailbox_test -pattern $pattern $command
37 set command ""
38 }
39 }
40 default {
41 set pattern [concat $pattern [list $line]]
42 }
43 }
44 }
45
46 close $chan
47
48 # end of url.exp
...@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) ...@@ -23,7 +23,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
23 ## ------------ ## 23 ## ------------ ##
24 24
25 $(srcdir)/package.m4: $(top_srcdir)/configure.ac 25 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
26 { \ 26 $(AM_V_GEN) { \
27 echo '# Signature of the current package.'; \ 27 echo '# Signature of the current package.'; \
28 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ 28 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
29 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ 29 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 # Require a reasonably recent autotest. 18 # Require a reasonably recent autotest.
19 m4_version_prereq([2.52g])
20 m4_include([testsuite.inc]) 19 m4_include([testsuite.inc])
21 20
22 dnl ------------------------------------------------------------ 21 dnl ------------------------------------------------------------
......
...@@ -24,7 +24,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) ...@@ -24,7 +24,7 @@ MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
24 ## ------------ ## 24 ## ------------ ##
25 25
26 $(srcdir)/package.m4: $(top_srcdir)/configure.ac 26 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
27 { \ 27 $(AM_V_GEN) { \
28 echo '# Signature of the current package.'; \ 28 echo '# Signature of the current package.'; \
29 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ 29 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
30 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ 30 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 # Require a reasonably recent autotest. 18 m4_include([testsuite.inc])
19 m4_version_prereq([2.52g])
20 19
21 dnl ------------------------------------------------------------ 20 dnl ------------------------------------------------------------
22 dnl testcompile(SCRIPT) -- test compilation of the Sieve SCRIPT 21 dnl testcompile(SCRIPT) -- test compilation of the Sieve SCRIPT
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 m4_include([testsuite.inc]) 18 dnl m4_include([testsuite.inc])
19 19
20 MUT_VERSION(sieve) 20 MUT_VERSION(sieve)
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 # Require a reasonably recent autotest.
19 m4_version_prereq([2.52g])
20
21 m4_define([AT_SKIP_TEST],[exit 77])
22
18 dnl ------------------------------------------------------------ 23 dnl ------------------------------------------------------------
19 dnl MUT_VERSION(TOOL) -- checks the version output from TOOL 24 dnl MUT_VERSION(TOOL) -- checks the version output from TOOL
20 dnl 25 dnl
...@@ -38,5 +43,3 @@ _EOT ...@@ -38,5 +43,3 @@ _EOT
38 AT_CLEANUP 43 AT_CLEANUP
39 ]) 44 ])
40 45
41 m4_define([AT_SKIP_TEST],[exit 77])
42
......