summaryrefslogtreecommitdiff
path: root/imap4d/tests/list.at
diff options
context:
space:
mode:
Diffstat (limited to 'imap4d/tests/list.at')
-rw-r--r--imap4d/tests/list.at75
1 files changed, 51 insertions, 24 deletions
diff --git a/imap4d/tests/list.at b/imap4d/tests/list.at
index a4b37346d..1185a9035 100644
--- a/imap4d/tests/list.at
+++ b/imap4d/tests/list.at
@@ -1,5 +1,5 @@
# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2011-2019 Free Software Foundation, Inc.
+# Copyright (C) 2011-2024 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
@@ -39,6 +39,11 @@ AT_CLEANUP
])
dnl ----------------------------------------------------------------------
+LIST_CHECK([],[list01],
+["" ""],
+[* LIST (\NoSelect) "/" ""
+])
+
LIST_CHECK([],[list02],
["" "*"],
[dnl
@@ -101,9 +106,12 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
])
LIST_CHECK([],[],
-["" "#archive:%"],
+["#archive:" "*"],
[* LIST (\NoInferiors) "." #archive:mbox
+* LIST (\NoInferiors) "." #archive:old.mbox1
+* LIST (\NoInferiors) "." #archive:old.very.saved
* LIST (\NoSelect) "." #archive:old
+* LIST (\NoSelect) "." #archive:old.very
],
[mkdir archive archive/old archive/old/very
cp $abs_top_srcdir/testsuite/spool/mbox archive
@@ -112,12 +120,9 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
])
LIST_CHECK([],[],
-["" "archive.*"],
-[* LIST (\NoInferiors) "." archive.mbox
-* LIST (\NoInferiors) "." archive.old.mbox1
-* LIST (\NoInferiors) "." archive.old.very.saved
-* LIST (\NoSelect) "." archive.old
-* LIST (\NoSelect) "." archive.old.very
+["" "#archive:%"],
+[* LIST (\NoInferiors) "." #archive:mbox
+* LIST (\NoSelect) "." #archive:old
],
[mkdir archive archive/old archive/old/very
cp $abs_top_srcdir/testsuite/spool/mbox archive
@@ -126,12 +131,9 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
])
LIST_CHECK([],[],
-["archive" "*"],
-[* LIST (\NoInferiors) "." archive.mbox
-* LIST (\NoInferiors) "." archive.old.mbox1
-* LIST (\NoInferiors) "." archive.old.very.saved
-* LIST (\NoSelect) "." archive.old
-* LIST (\NoSelect) "." archive.old.very
+["#archive:" "%"],
+[* LIST (\NoInferiors) "." #archive:mbox
+* LIST (\NoSelect) "." #archive:old
],
[mkdir archive archive/old archive/old/very
cp $abs_top_srcdir/testsuite/spool/mbox archive
@@ -140,7 +142,22 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
])
LIST_CHECK([],[],
-["archive." "*"],
+["#archive:" "a.b"],
+[* LIST (\NoSelect) "." #archive:a.b
+],
+[mkdir archive archive/a archive/a/b
+])
+
+LIST_CHECK([],[],
+["#archive:" "a.b.c"],
+[* LIST (\NoInferiors) "." #archive:a.b.c
+],
+[mkdir archive archive/a archive/a/b
+cp $abs_top_srcdir/testsuite/spool/mbox archive/a/b/c
+])
+
+LIST_CHECK([],[],
+["" "archive.*"],
[* LIST (\NoInferiors) "." archive.mbox
* LIST (\NoInferiors) "." archive.old.mbox1
* LIST (\NoInferiors) "." archive.old.very.saved
@@ -163,18 +180,28 @@ LIST_CHECK([],[],
],
[mkdir archive archive/old archive/old/very
cp $abs_top_srcdir/testsuite/spool/mbox archive
+cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old
+# NOTE: Mailbox name with a directory delimiter will be ignored
cp $abs_top_srcdir/testsuite/spool/mbox archive/mbox.1
+cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
+])
+
+LIST_CHECK([],[],
+["archive" "*"],
+[],
+[mkdir archive archive/old archive/old/very
+cp $abs_top_srcdir/testsuite/spool/mbox archive
cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old
cp $abs_top_srcdir/testsuite/spool/mbox1 archive/old/very/saved
])
LIST_CHECK([],[],
-["~" "*"],
+["~/" "*"],
[1 NO LIST The requested item could not be found
])
LIST_CHECK([],[],
-["~foo" "%"],
+["~foo/" "%"],
[* LIST (\NoInferiors) "/" ~foo/mbox
* LIST (\NoSelect) "/" ~foo/dir
],
@@ -185,7 +212,7 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 home/bar
])
LIST_CHECK([],[],
-["~foo" "*"],
+["~foo/" "*"],
[* LIST (\NoInferiors) "/" ~foo/dir/saved
* LIST (\NoInferiors) "/" ~foo/mbox
* LIST (\NoSelect) "/" ~foo/dir
@@ -209,7 +236,7 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 home/bar
])
LIST_CHECK([],[],
-["~foo" "%/*"],
+["~foo/" "%/*"],
[* LIST (\NoInferiors) "/" ~foo/dir/saved
],
[mkdir home home/foo home/foo/dir home/bar
@@ -221,7 +248,7 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 home/bar
# ###
LIST_CHECK([],[],
-["other" "*"],
+["other/" "*"],
[1 NO LIST The requested item could not be found
])
@@ -261,7 +288,7 @@ cp $abs_top_srcdir/testsuite/spool/mbox1 home/bar
])
LIST_CHECK([],[],
-["other/foo" "%/*"],
+["other/foo/" "%/*"],
[* LIST (\NoInferiors) "/" other/foo/dir/saved
],
[mkdir home home/foo home/foo/dir home/bar
@@ -282,21 +309,21 @@ LIST_CHECK([root ref + asterisk],[list03],
])
LIST_CHECK([absolute reference + asterisk],[list04],
-["/foo/bar/baz" "*"],
+["/foo/bar/baz/" "*"],
[],
[mkdir IMAP4D_HOMEDIR/folder
MUT_MBCOPY($abs_top_srcdir/testsuite/folder/one,IMAP4D_HOMEDIR/folder)
MUT_MBCOPY($abs_top_srcdir/testsuite/folder/two,IMAP4D_HOMEDIR/folder)])
LIST_CHECK([absolute reference + percent],[list05],
-["/foo/bar/baz" "%"],
+["/foo/bar/baz/" "%"],
[],
[mkdir IMAP4D_HOMEDIR/folder
MUT_MBCOPY($abs_top_srcdir/testsuite/folder/one,IMAP4D_HOMEDIR/folder)
MUT_MBCOPY($abs_top_srcdir/testsuite/folder/two,IMAP4D_HOMEDIR/folder)])
LIST_CHECK([absolute reference + mailbox],[list06],
-["/foo/bar/baz" "mbox"],
+["/foo/bar/baz/" "mbox"],
[],
[mkdir IMAP4D_HOMEDIR/folder
MUT_MBCOPY($abs_top_srcdir/testsuite/folder/one,IMAP4D_HOMEDIR/folder)

Return to:

Send suggestions and report system problems to the System administrator.