summaryrefslogtreecommitdiff
path: root/libproto/dotmail/tests/delete.at
diff options
context:
space:
mode:
Diffstat (limited to 'libproto/dotmail/tests/delete.at')
-rw-r--r--libproto/dotmail/tests/delete.at293
1 files changed, 277 insertions, 16 deletions
diff --git a/libproto/dotmail/tests/delete.at b/libproto/dotmail/tests/delete.at
index 84bdadb1b..b7a0c7c99 100644
--- a/libproto/dotmail/tests/delete.at
+++ b/libproto/dotmail/tests/delete.at
@@ -1,5 +1,5 @@
# GNU Mailutils -- a suite of utilities for electronic mail
-# Copyright (C) 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019-2024 Free Software Foundation, Inc.
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@@ -14,7 +14,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-DM_MESG([delete],
+AT_SETUP([delete])
+
+AT_DATA([inbox],
[Received: (from hare@wonder.land)
by wonder.land id 3301
for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
@@ -23,7 +25,8 @@ From: March Hare <hare@wonder.land>
Message-Id: <200207292200.3301@wonder.land>
To: Alice <alice@wonder.land>
Subject: Invitation
-Return-Path: hare@wonder.land
+X-IMAPbase: 10 9
+X-UID: 1
Have some wine
.
@@ -35,7 +38,7 @@ From: Alice <alice@wonder.land>
Message-Id: <200207292200.3302@wonder.land>
To: March Hare <hare@wonder.land>
Subject: Re: Invitation
-Return-Path: alice@wonder.land
+X-UID: 2
I don't see any wine
.
@@ -47,7 +50,7 @@ From: March Hare <hare@wonder.land>
Message-Id: <200207292200.3303@wonder.land>
To: Alice <alice@wonder.land>
Subject: Re: Invitation
-Return-Path: hare@wonder.land
+X-UID: 3
There isn't any
.
@@ -59,36 +62,294 @@ From: Alice <alice@wonder.land>
Message-Id: <200207292200.3304@wonder.land>
To: March Hare <hare@wonder.land>
Subject: Re: Invitation
-Return-Path: alice@wonder.land
+X-UID: 4
Then it wasn't very civil of you to offer it
.
-],
-[],[dm_mesg count],
-[# Mark third message as deleted
-3
+Received: (from hare@wonder.land)
+ by wonder.land id 3305
+ for alice@wonder.land; Mon, 29 Jul 2002 22:00:10 +0100
+Date: Mon, 29 Jul 2002 22:00:05 +0100
+From: March Hare <hare@wonder.land>
+Message-Id: <200207292200.3305@wonder.land>
+To: Alice <alice@wonder.land>
+Subject: Re: Invitation
+X-UID: 5
+
+It wasn't very civil of you to sit down without being invited
+.
+Received: (from alice@wonder.land)
+ by wonder.land id 3306
+ for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date: Mon, 29 Jul 2002 22:00:06 +0100
+From: Alice <alice@wonder.land>
+Message-Id: <200207292200.3306@wonder.land>
+To: March Hare <hare@wonder.land>
+Subject: Re: Invitation
+X-UID: 6
+
+I didn't know it was YOUR table, it's laid for a
+great many more than three.
+.
+])
+# --------------------------
+
+AT_DATA([commands],
+[3
set_deleted
-# Expunge deleted messages
expunge
+count
# Message 4 becomes 3 after expunge. Re-select it.
3
-# Display headers and body to check if it has been properly updated.
+uid
headers
-body_text
-],
+])
+
+AT_CHECK([cp inbox inbox1
+cp inbox inbox2])
+
+AT_CHECK([mbop -m inbox < commands],
+[0],
[3 current message
3 set_deleted: OK
expunge: OK
+count: 5
3 current message
+3 uid: 4
3 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
Date:Mon, 29 Jul 2002 22:00:04 +0100
From:Alice <alice@wonder.land>
Message-Id:<200207292200.3304@wonder.land>
To:March Hare <hare@wonder.land>
Subject:Re: Invitation
-Return-Path:alice@wonder.land
+X-UID:4
-3 body_text: Then it wasn't very civil of you to offer it
+])
+AT_DATA([commands1],
+[1
+set_deleted
+2
+set_deleted
+5
+set_deleted
+expunge
+count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m inbox1 < commands1|x_imapbase_normalize],
+[0],
+[1 current message
+1 set_deleted: OK
+2 current message
+2 set_deleted: OK
+5 current message
+5 set_deleted: OK
+expunge: OK
count: 3
+1 current message
+1 uid: 3
+1 headers: Received:(from hare@wonder.land) by wonder.land id 3303 for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
+Date:Mon, 29 Jul 2002 22:00:03 +0100
+From:March Hare <hare@wonder.land>
+Message-Id:<200207292200.3303@wonder.land>
+To:Alice <alice@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:3
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+# ##
+AT_DATA([commands1a],
+[count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
])
+
+AT_CHECK([mbop -m inbox1 < commands1a|x_imapbase_normalize],
+[0],
+[count: 3
+1 current message
+1 uid: 3
+1 headers: Received:(from hare@wonder.land) by wonder.land id 3303 for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
+Date:Mon, 29 Jul 2002 22:00:03 +0100
+From:March Hare <hare@wonder.land>
+Message-Id:<200207292200.3303@wonder.land>
+To:Alice <alice@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:3
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+# ##
+AT_DATA([commands2],
+[1
+set_deleted
+3
+set_deleted
+5
+set_deleted
+expunge
+count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m inbox2 < commands2|x_imapbase_normalize],
+[0],
+[1 current message
+1 set_deleted: OK
+3 current message
+3 set_deleted: OK
+5 current message
+5 set_deleted: OK
+expunge: OK
+count: 3
+1 current message
+1 uid: 2
+1 headers: Received:(from alice@wonder.land) by wonder.land id 3302 for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
+Date:Mon, 29 Jul 2002 22:00:02 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3302@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:2
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+AT_DATA([commands2a],
+[count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m inbox2 < commands2a|x_imapbase_normalize],
+[0],
+[count: 3
+1 current message
+1 uid: 2
+1 headers: Received:(from alice@wonder.land) by wonder.land id 3302 for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
+Date:Mon, 29 Jul 2002 22:00:02 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3302@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:2
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.