mbdel.at
2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This file is part of GNU Mailutils. -*- Autotest -*-
# Copyright (C) 2010-2012, 2014-2016 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3, or (at
# your option) any later version.
#
# GNU Mailutils is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
dnl ------------------------------------------------------------
dnl MBDEL_TEST([FORMAT], [PROG],
dnl [CODE], [STDOUT = `'], [STDERR = `'],
dnl [RUN-IF-FAIL], [RUN-IF-PASS])
m4_pushdef([MBDEL_TEST],[
AT_SETUP([Mailbox deletion: $1])
AT_KEYWORDS([mailbox mbdel mbdel-$1])
AT_CHECK([$2],[$3],[$4],[$5],[$6],[$7],[$8])
AT_CLEANUP
])
dnl ------------------------------------------------------------
MBDEL_TEST([mbox],
[MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox1)
mbdel mbox:mbox1 || exit 2
test -f mbox1
],
[1])
MBDEL_TEST([mh],
[test "$MH_SUPPORT" = yes || AT_SKIP_TEST
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1)
mbdel mh:mbox1 || exit 2
test -d mbox1
],
[1])
MBDEL_TEST([maildir],
[test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
MUT_MBCOPY($abs_top_srcdir/testsuite/maildir/mbox1)
mbdel maildir:mbox1 || exit 2
test -d mbox1
],
[1])
MBDEL_TEST([mh with subdirs],
[test "$MH_SUPPORT" = yes || AT_SKIP_TEST
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1)
mkdir mbox1/subfolder
mbdel mh:mbox1 || exit 2
test -d mbox1 && find mbox1
],
[0],
[mailbox removed, but has subfolders
mbox1
mbox1/subfolder
])
MBDEL_TEST([maildir with subdirs],
[test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
MUT_MBCOPY($abs_top_srcdir/testsuite/maildir/mbox1)
mkdir mbox1/subfolder
mbdel maildir:mbox1 || exit 2
test -d mbox1 && find mbox1
],
[0],
[mailbox removed, but has subfolders
mbox1
mbox1/subfolder
])
m4_popdef([MBDEL_TEST])