summaryrefslogtreecommitdiff
path: root/libmailutils/tests/fromflt.at
diff options
context:
space:
mode:
Diffstat (limited to 'libmailutils/tests/fromflt.at')
-rw-r--r--libmailutils/tests/fromflt.at96
1 files changed, 96 insertions, 0 deletions
diff --git a/libmailutils/tests/fromflt.at b/libmailutils/tests/fromflt.at
new file mode 100644
index 000000000..a5b331375
--- /dev/null
+++ b/libmailutils/tests/fromflt.at
@@ -0,0 +1,96 @@
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# -------------------------------------------
19# Data for 'From' filter tests.
20# -------------------------------------------
21
22m4_define([from_plain_text],[From this time on
23from that source
24 From stdin
25and
26From them
27])
28
29m4_define([from_encoded_text],[>From this time on
30from that source
31 From stdin
32and
33>From them
34])
35
36# -------------------------------------------
37# Test 'From' encoding
38# -------------------------------------------
39
40# Test read mode
41
42AT_SETUP([from filter encoding (read)])
43AT_KEYWORDS([from frome fromer encode])
44
45AT_CHECK([
46AT_DATA([input],from_plain_text)
47fltst from encode read < input
48],
49[0],
50[from_encoded_text])
51
52AT_CLEANUP
53
54# The same, in write mode
55
56AT_SETUP([from filter encoding (write)])
57AT_KEYWORDS([from frome fromew encode])
58
59AT_CHECK([
60AT_DATA([input],from_plain_text)
61fltst from encode write < input
62],
63[0],
64[from_encoded_text])
65
66AT_CLEANUP
67
68# -------------------------------------------
69# Test '>From' decoding
70# -------------------------------------------
71
72AT_SETUP([from filter decoding (read)])
73AT_KEYWORDS([from fromd fromdr decode])
74
75AT_CHECK([
76AT_DATA([input],from_encoded_text)
77fltst from decode read < input
78],
79[0],
80[from_plain_text])
81
82AT_CLEANUP
83
84# The same, in write mode
85
86AT_SETUP([from filter decoding (write)])
87AT_KEYWORDS([from fromd fromdw decode])
88
89AT_CHECK([
90AT_DATA([input],from_encoded_text)
91fltst from decode write < input
92],
93[0],
94[from_plain_text])
95
96AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.