summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-08-19 08:49:15 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-08-19 08:49:15 +0300
commitcd3a5a6d98e23e20e5fad3b5da108c4a11a9032d (patch)
tree14983118500051ea440b232db692ae8f5bb4de73
parentd2eb03a3b9db683418cc0bd084915468e4968854 (diff)
downloadmailutils-cd3a5a6d98e23e20e5fad3b5da108c4a11a9032d.tar.gz
mailutils-cd3a5a6d98e23e20e5fad3b5da108c4a11a9032d.tar.bz2
libmailutils/tests: Use MU_CHECK for simple tests
* testsuite/testsuite.inc (MU_CHECK): Remove superfluous quoting. * libmailutils/tests/modmesg.at: New file. * libmailutils/tests/streams.at: New file. * libmailutils/tests/strin.at: Minor change. * libmailutils/tests/modmesg02.at: Remove. * libmailutils/tests/streamshift.at: Remove. * libmailutils/tests/strtoc.at: Remove. * libmailutils/tests/t0-stream.at: Remove. * libmailutils/tests/t1-stream.at: Remove. * libmailutils/tests/getdelim.at: Remove. * libmailutils/tests/modmesg00.at: Remove. * libmailutils/tests/modmesg01.at: Remove. * libmailutils/tests/modmesg03.at: Remove. * libmailutils/tests/testsuite.at: Update. * libmailutils/tests/Makefile.am: Update.
-rw-r--r--libmailutils/tests/Makefile.am11
-rw-r--r--libmailutils/tests/getdelim.at12
-rw-r--r--libmailutils/tests/modmesg.at (renamed from libmailutils/tests/modmesg02.at)47
-rw-r--r--libmailutils/tests/modmesg00.at29
-rw-r--r--libmailutils/tests/modmesg01.at31
-rw-r--r--libmailutils/tests/modmesg03.at31
-rw-r--r--libmailutils/tests/streams.at (renamed from libmailutils/tests/streamshift.at)34
-rw-r--r--libmailutils/tests/strin.at11
-rw-r--r--libmailutils/tests/strtoc.at19
-rw-r--r--libmailutils/tests/t0-stream.at20
-rw-r--r--libmailutils/tests/t1-stream.at20
-rw-r--r--libmailutils/tests/testsuite.at18
-rw-r--r--testsuite/testsuite.inc2
13 files changed, 76 insertions, 209 deletions
diff --git a/libmailutils/tests/Makefile.am b/libmailutils/tests/Makefile.am
index b29e24cd7..e5065f73c 100644
--- a/libmailutils/tests/Makefile.am
+++ b/libmailutils/tests/Makefile.am
@@ -110,7 +110,6 @@ TESTSUITE_AT += \
110 fsfolder02.at\ 110 fsfolder02.at\
111 fsfolder03.at\ 111 fsfolder03.at\
112 fsfolder04.at\ 112 fsfolder04.at\
113 getdelim.at\
114 hdrcpy.at\ 113 hdrcpy.at\
115 hdrflt.at\ 114 hdrflt.at\
116 htmlent.at\ 115 htmlent.at\
@@ -123,10 +122,7 @@ TESTSUITE_AT += \
123 logstr.at\ 122 logstr.at\
124 mailcap.at\ 123 mailcap.at\
125 mimehdr.at\ 124 mimehdr.at\
126 modmesg00.at\ 125 modmesg.at\
127 modmesg01.at\
128 modmesg02.at\
129 modmesg03.at\
130 modtofsaf.at\ 126 modtofsaf.at\
131 msgset.at\ 127 msgset.at\
132 parseopt00.at\ 128 parseopt00.at\
@@ -176,13 +172,10 @@ TESTSUITE_AT += \
176 recenv.at\ 172 recenv.at\
177 scantime.at\ 173 scantime.at\
178 strftime.at\ 174 strftime.at\
179 streamshift.at\ 175 streams.at\
180 strerr.at\ 176 strerr.at\
181 strin.at\ 177 strin.at\
182 strout.at\ 178 strout.at\
183 strtoc.at\
184 t0-stream.at\
185 t1-stream.at\
186 url.at\ 179 url.at\
187 url-comp.at\ 180 url-comp.at\
188 xml.at\ 181 xml.at\
diff --git a/libmailutils/tests/getdelim.at b/libmailutils/tests/getdelim.at
deleted file mode 100644
index 493412e64..000000000
--- a/libmailutils/tests/getdelim.at
+++ /dev/null
@@ -1,12 +0,0 @@
1AT_SETUP([getdelim])
2AT_CHECK([stream-getdelim],
3[0],
4[0: No buffering
51: Linear buffering
62: Linear buffering (small buffer)
73: Full buffering (big buffer)
84: Full buffering (moderate buffer)
95: Full buffering (small buffer)
10])
11AT_CLEANUP
12
diff --git a/libmailutils/tests/modmesg02.at b/libmailutils/tests/modmesg.at
index a4813fa11..f868205b9 100644
--- a/libmailutils/tests/modmesg02.at
+++ b/libmailutils/tests/modmesg.at
@@ -14,11 +14,32 @@
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 GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 15# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16 16
17AT_SETUP([modify body]) 17MU_CHECK([unmodified message],
18AT_KEYWORDS([modmesg02]) 18 [modmesg00],
19 [modmesg],
20 [0],
21[From: root
22
23This is a test message.
24oo
25])
26
27MU_CHECK([add headers],
28 [modmesg01],
29 [modmesg -a To:gray@localhost -a Subject:test],
30 [0],
31[From: root
32To: gray@localhost
33Subject: test
34
35This is a test message.
36oo
37])
19 38
20AT_CHECK([modmesg -t "word\n"], 39MU_CHECK([modify body],
21[0], 40 [modmesg02],
41 [modmesg -t "word\n"],
42 [0],
22[From: root 43[From: root
23 44
24This is a test message. 45This is a test message.
@@ -26,13 +47,25 @@ oo
26word 47word
27]) 48])
28 49
29AT_CHECK([modmesg -l 0 -t "That"], 50MU_CHECK([modify body 2],
30[0], 51 [modmesg03],
52 [modmesg -l 0 -t "That"],
53 [0],
31[From: root 54[From: root
32 55
33That is a test message. 56That is a test message.
34oo 57oo
35]) 58])
36 59
37AT_CLEANUP 60MU_CHECK([modify headers and body],
61 [modmesg03],
62 [modmesg -a To:gray@localhost -a Subject:test -l 0 -t "That"],
63 [0],
64[From: root
65To: gray@localhost
66Subject: test
67
68That is a test message.
69oo
70])
38 71
diff --git a/libmailutils/tests/modmesg00.at b/libmailutils/tests/modmesg00.at
deleted file mode 100644
index 60758e5ad..000000000
--- a/libmailutils/tests/modmesg00.at
+++ /dev/null
@@ -1,29 +0,0 @@
1# This file is part of GNU Mailutils. -*- Autotest -*-
2# Copyright (C) 2011-2020 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# GNU Mailutils 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
17AT_SETUP([unmodified message])
18AT_KEYWORDS([modmesg00])
19
20AT_CHECK([modmesg],
21[0],
22[From: root
23
24This is a test message.
25oo
26])
27
28AT_CLEANUP
29
diff --git a/libmailutils/tests/modmesg01.at b/libmailutils/tests/modmesg01.at
deleted file mode 100644
index 3b93bf947..000000000
--- a/libmailutils/tests/modmesg01.at
+++ /dev/null
@@ -1,31 +0,0 @@
1# This file is part of GNU Mailutils. -*- Autotest -*-
2# Copyright (C) 2011-2020 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# GNU Mailutils 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
17AT_SETUP([add headers])
18AT_KEYWORDS([modmesg01])
19
20AT_CHECK([modmesg -a To:gray@localhost -a Subject:test],
21[0],
22[From: root
23To: gray@localhost
24Subject: test
25
26This is a test message.
27oo
28])
29
30AT_CLEANUP
31
diff --git a/libmailutils/tests/modmesg03.at b/libmailutils/tests/modmesg03.at
deleted file mode 100644
index cf637147f..000000000
--- a/libmailutils/tests/modmesg03.at
+++ /dev/null
@@ -1,31 +0,0 @@
1# This file is part of GNU Mailutils. -*- Autotest -*-
2# Copyright (C) 2011-2020 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# GNU Mailutils is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the impl