aboutsummaryrefslogtreecommitdiff
path: root/tests/hdel03.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hdel03.at')
-rw-r--r--tests/hdel03.at73
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/hdel03.at b/tests/hdel03.at
new file mode 100644
index 0000000..1249e68
--- /dev/null
+++ b/tests/hdel03.at
@@ -0,0 +1,73 @@
1# This file is part of GNU Anubis testsuite. -*- autotest -*-
2# Copyright (C) 2003-2024 The Anubis Team.
3#
4# GNU Anubis is free software; you can redistribute it and/or modify it
5# under the terms of the GNU General Public License as published by the Free
6# Software Foundation; either version 3 of the License, or (at your option)
7# any later version.
8#
9# GNU Anubis 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 along
15# with GNU Anubis. If not, see <http://www.gnu.org/licenses/>.
16AT_SETUP([Remove all headers])
17AT_KEYWORDS([header remove])
18AT_ANUBIS_CONFIG([anubis.rc],
19[BEGIN CONTROL
20logfile $PWD/etc/anubis.log
21local-mta $abs_builddir/mta -bs -d $PWD/etc/mta.log
22use-pam no
23END
24
25BEGIN RULE
26remove :re [["^X-.*"]]
27END
28])
29AT_DATA([input],
30[HELO localhost
31MAIL FROM:<gray@gnu.org>
32RCPT TO:<polak@gnu.org>
33DATA
34X-From: <gray@gnu.org>
35X-To: <polak@gnu.org>
36X-Subject: The Tao of Programming, Part I
37X-Part-Number: I
38X-Mailer: DejaGNU
39
40 A manager went to his programmers and told them: "As regards to your
41work hours: you are going to have to come in at nine in the morning and leave
42at five in the afternoon." At this, all of them became angry and several
43resigned on the spot.
44 So the manager said: "All right, in that case you may set your own
45working hours, as long as you finish your projects on schedule." The
46programmers, now satisfied, began to come in a noon and work to the wee
47hours of the morning.
48.
49QUIT
50])
51AT_CHECK([
52anubis --norc --relax-perm-check --altrc etc/anubis.rc --stdio < input | tr -d '\r'
53],
54[0],
55[220 localhost ([GNU Anubis v]AT_PACKAGE_VERSION) bitbucket ready
56250 pleased to meet you
57250 Sender OK
58250 Recipient OK
59354 Enter mail, end with "." on a line by itself
60250 Mail accepted for delivery
61221 Done
62],
63[ignore])
64AT_CHECK([diff input etc/mta.log],
65[1],
66[5,9d4
67< X-From: <gray@gnu.org>
68< X-To: <polak@gnu.org>
69< X-Subject: The Tao of Programming, Part I
70< X-Part-Number: I
71< X-Mailer: DejaGNU
72])
73AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.