1# This file is part of GNU Mailutils. -*- Autotest -*- 2# Copyright (C) 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 17m4_pushdef([IMAP4D_HOMEDIR],[spool]) 18 19AT_SETUP([list]) 20AT_KEYWORDS([imap list folder]) 21AT_CHECK([ 22# Prepare namespaces 23mkdir spool spool/A spool/B 24 25mkdir archive archive/c archive/d archive/d/e 26 27mkdir other other/foo other/foo/a other/foo/b other/bar other/bar/qux 28 29touch spool/sent spool/outgoing spool/A/backup spool/A/cancelled 30touch archive/01 archive/02 archive/03 31touch archive/d/01 archive/d/02 archive/d/e/03 archive/d/e/04 32 33touch other/foo/draft other/bar/draft other/bar/X 34 35make_config spool 36]) 37 38AT_CHECK([ 39m4_changecom([//]) 40testclient imap4d.conf 'imapfolder url=$URL dnl 41 list "" "" dnl 42 list "" % dnl 43 list "" \* dnl 44 list A/ % dnl 45 list "#archive:" % dnl 46 list "#archive:" \* dnl 47 list "#archive:" "d.e" dnl 48 list "#archive:d." "e" dnl 49 list "#archive:d." "e.%" dnl 50 list "#archive:d." \*' 51m4_changecom([#]) 52], 53[0], 54[# LIST "" "" 55d- / 0 "" 56# LIST "" "%" 57d- / 0 "A" 58d- / 0 "B" 59-f 0 "INBOX" 60-f / 0 "outgoing" 61-f / 0 "sent" 62# LIST "" "*" 63d- / 0 "A" 64-f / 1 "A/backup" 65-f / 1 "A/cancelled" 66d- / 0 "B" 67-f 0 "INBOX" 68-f / 0 "outgoing" 69-f / 0 "sent" 70# LIST "A/" "%" 71-f / 1 "A/backup" 72-f / 1 "A/cancelled" 73# LIST "#archive:" "%" 74-f . 0 "#archive:01" 75-f . 0 "#archive:02" 76-f . 0 "#archive:03" 77d- . 0 "#archive:c" 78d- . 0 "#archive:d" 79# LIST "#archive:" "*" 80-f . 0 "#archive:01" 81-f . 0 "#archive:02" 82-f . 0 "#archive:03" 83d- . 0 "#archive:c" 84d- . 0 "#archive:d" 85-f . 1 "#archive:d.01" 86-f . 1 "#archive:d.02" 87d- . 1 "#archive:d.e" 88-f . 2 "#archive:d.e.03" 89-f . 2 "#archive:d.e.04" 90# LIST "#archive:" "d.e" 91d- . 1 "#archive:d.e" 92# LIST "#archive:d." "e" 93d- . 1 "#archive:d.e" 94# LIST "#archive:d." "e.%" 95-f . 2 "#archive:d.e.03" 96-f . 2 "#archive:d.e.04" 97# LIST "#archive:d." "*" 98-f . 1 "#archive:d.01" 99-f . 1 "#archive:d.02" 100d- . 1 "#archive:d.e" 101-f . 2 "#archive:d.e.03" 102-f . 2 "#archive:d.e.04" 103]) 104 105 106 107AT_CLEANUP