1# This file is part of GNU Mailutils. -*- Autotest -*-
2# Copyright (C) 2007-2021 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
17MUT_TESTCASE([exists: single header],[test exists exists01],
18[
19if exists "X-Caffeine" {
20      discard;
21}
22],[],[0],[],
23[DISCARD on msg uid 1: marking as deleted
24IMPLICIT KEEP on msg uid 2
25IMPLICIT KEEP on msg uid 3
26])
27
28MUT_TESTCASE([exists: array],[test exists exists02],
29[
30if exists [["X-Caffeine", "From"]] {
31      discard;
32}
33],[],[0],[],
34[DISCARD on msg uid 1: marking as deleted
35IMPLICIT KEEP on msg uid 2
36IMPLICIT KEEP on msg uid 3
37])
38
39MUT_TESTCASE([exists: array 2],[test exists exists03],
40[
41if exists [["X-Caffeine", "X-Status"]] {
42      discard;
43}
44],[],[0],[],
45[IMPLICIT KEEP on msg uid 1
46IMPLICIT KEEP on msg uid 2
47IMPLICIT KEEP on msg uid 3
48])
49
50