1# This file is part of GNU Anubis testsuite.
2# Copyright (C) 2003-2014 The Anubis Team.
3#
4# GNU Anubis 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 2 of the License, or
7# (at your option) 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
15# along with GNU Anubis; if not, write to the Free Software Foundation,
16# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17
18:TEST Trigger mechanism
19:MODE SPAWN
20:OPTIONS --stdio
21:RCFILE trigger.rc
22:RETCODE 0
23:PATTERN
24:EXPECT 220
25HELO localhost
26:EXPECT 250
27MAIL FROM:<polak@gnu.org>
28:EXPECT 250
29RCPT TO:<gray@gnu.org>
30:EXPECT 250
31DATA
32:EXPECT 354
33From: <polak@gnu.org>
34To: <gray@gnu.org>
35:DEL Subject: COME AS YOU ARE@@trigger1
36:ADD Subject: COME AS YOU ARE
37:ADD X-Trigger-Test: is the true path to nirvana...
38
39Come as you are, as you were
40As I want you to to be.
41As a friend, as a friend
42As an old enemy
43Take your time
44Hurry up, the choice is yours
45Don't be late.
46Take a rest, as a friend
47As an old memoria...
48
49.
50:EXPECT 250
51MAIL FROM:<polak@gnu.org>
52:EXPECT 250
53RCPT TO:<gray@gnu.org>
54:EXPECT 250
55DATA
56:EXPECT 354
57From: <polak@gnu.org>
58To: <gray@gnu.org>
59:DEL Subject: YOU KNOW YOU'RE RIGHT@@trigger2 TEEN SPIRIT
60:ADD Subject: YOU KNOW YOU'RE RIGHT
61:ADD X-Trigger-Test: SMELLS LIKE TEEN SPIRIT
62
63With the lights out, it's less dangerous
64Here we are now, entertain us
65I feel stupid, and contagious
66Here we are now, entertain us
67
68.
69:EXPECT 250
70QUIT
71:EXPECT 221
72:END PATTERN
73:END TEST
74
75