diff options
Diffstat (limited to 'tests/hdel03.at')
-rw-r--r-- | tests/hdel03.at | 73 |
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/>. | ||
16 | AT_SETUP([Remove all headers]) | ||
17 | AT_KEYWORDS([header remove]) | ||
18 | AT_ANUBIS_CONFIG([anubis.rc], | ||
19 | [BEGIN CONTROL | ||
20 | logfile $PWD/etc/anubis.log | ||
21 | local-mta $abs_builddir/mta -bs -d $PWD/etc/mta.log | ||
22 | use-pam no | ||
23 | END | ||
24 | |||
25 | BEGIN RULE | ||
26 | remove :re [["^X-.*"]] | ||
27 | END | ||
28 | ]) | ||
29 | AT_DATA([input], | ||
30 | [HELO localhost | ||
31 | MAIL FROM:<gray@gnu.org> | ||
32 | RCPT TO:<polak@gnu.org> | ||
33 | DATA | ||
34 | X-From: <gray@gnu.org> | ||
35 | X-To: <polak@gnu.org> | ||
36 | X-Subject: The Tao of Programming, Part I | ||
37 | X-Part-Number: I | ||
38 | X-Mailer: DejaGNU | ||
39 | |||
40 | A manager went to his programmers and told them: "As regards to your | ||
41 | work hours: you are going to have to come in at nine in the morning and leave | ||
42 | at five in the afternoon." At this, all of them became angry and several | ||
43 | resigned on the spot. | ||
44 | So the manager said: "All right, in that case you may set your own | ||
45 | working hours, as long as you finish your projects on schedule." The | ||
46 | programmers, now satisfied, began to come in a noon and work to the wee | ||
47 | hours of the morning. | ||
48 | . | ||
49 | QUIT | ||
50 | ]) | ||
51 | AT_CHECK([ | ||
52 | anubis --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 | ||
56 | 250 pleased to meet you | ||
57 | 250 Sender OK | ||
58 | 250 Recipient OK | ||
59 | 354 Enter mail, end with "." on a line by itself | ||
60 | 250 Mail accepted for delivery | ||
61 | 221 Done | ||
62 | ], | ||
63 | [ignore]) | ||
64 | AT_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 | ]) | ||
73 | AT_CLEANUP | ||