Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ComplexMail.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ComplexMail.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ComplexMail.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ComplexMail.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,330 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+#
+# TODO: This mail is not parsed correctly by JavaMail.
+# TODO: use Mime4J
+#
+C: A2 CREATE testmailbox
+S: A2 OK CREATE completed\.
+C: A3 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY (.)*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\](.)*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A3 OK \[READ-WRITE\] SELECT completed\.
+C: A20 APPEND testmailbox {14862+}
+C: Return-Path: <[email protected]>
+C: Received: (qmail 16059 invoked from network); 11 Mar 2008 18:54:16 -0000
+C: Received: from unknown (HELO pre-smtp34-01.prod.mesa1.secureserver.net)
+C:         ([10.0.19.134]) (envelope-sender <[email protected]>) 
by
+C:         smtp28.prod.mesa1.secureserver.net (qmail-1.03) with SMTP for
+C:         <[email protected]>; 11 Mar 2008 18:54:16 -0000
+C: Received: (qmail 24109 invoked from network); 11 Mar 2008 18:54:16 -0000
+C: Received: from minotaur.apache.org ([140.211.11.9]) (envelope-sender
+C:         <[email protected]>) by
+C:         pre-smtp34-01.prod.mesa1.secureserver.net (qmail-ldap-1.03) with 
SMTP for
+C:         <[email protected]>; 11 Mar 2008 18:54:15 -0000
+C: Received: (qmail 33110 invoked by uid 1289); 11 Mar 2008 18:54:14 -0000
+C: Delivered-To: [email protected]
+C: Received: (qmail 33091 invoked from network); 11 Mar 2008 18:54:14 -0000
+C: Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by
+C:         minotaur.apache.org with SMTP; 11 Mar 2008 18:54:14 -0000
+C: Received: (qmail 12832 invoked by uid 500); 11 Mar 2008 18:54:10 -0000
+C: Delivered-To: [email protected]
+C: Delivered-To: rob@localhost
+C: Delivered-To: rob@localhost
+C: Received: (qmail 12693 invoked by uid 99); 11 Mar 2008 18:54:10 -0000
+C: Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by
+C:         apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2008 11:54:10 
-0700
+C: X-ASF-Spam-Status: No, hits=5.3 required=10.0
+C:         tests=HTML_MESSAGE,MIME_QP_LONG_LINE,MSGID_FROM_MTA_HEADER,SPF_PASS
+C: X-Spam-Check-By: apache.org
+C: Received-SPF: pass (nike.apache.org: domain of
+C:         
3mtxwrxukbyyecngpfct-pqvkhkecvkqpiqqing.eqotfqpmkpcrcejg....@calendar-server.bounces.google.com
+C:         designates 64.233.166.140 as permitted sender)
+C: Received: from [64.233.166.140] (HELO py-out-f140.google.com)
+C:         (64.233.166.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 
Mar 2008
+C:         18:53:18 +0000
+C: Received: by py-out-f140.google.com with SMTP id a74so255262pye.5 for
+C:         <[email protected]>; Tue, 11 Mar 2008 11:53:38 -0700 (PDT)
+C: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta;
+C:         
h=domainkey-signature:mime-version:message-id:date:reply-to:sender:received:subject:from:to:content-type;
+C:         bh=a0xHxfGwMbTaCb1AQbvdZZ4bcSJ2pPfhH9+aq/N8Iio=;
+C:         
b=XcR46ahkaRiXL6w4DXB16+pG9O4qvSUyCHzL8N3rebn6+s3HAlztkGBCdXbNTOSeLnjEQnv+2slUMkdQy+ZJdg==
+C: DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta;
+C:         
h=mime-version:message-id:date:reply-to:sender:subject:from:to:content-type;
+C:         
b=E3kUX5aHg+csZ3D0TcHKt9Wie43boX+xpyARVjHAhQ0fJVt9OAzCI/xPDTBpTBjGaDcjnFeFcHWZF9UeXbx8Lg==
+C: MIME-Version: 1.0
+C: Message-ID: <[email protected]>
+C: Date: Tue, 11 Mar 2008 11:53:38 -0700
+C: Reply-To: Robert Burrell Donkin <[email protected]>
+C: Sender: Google Calendar <[email protected]>
+C: Received: by 10.35.108.12 with SMTP id k12mr18969364pym.3.1205261618449;
+C:         Tue,  11 Mar 2008 11:53:38 -0700 (PDT)
+C: Subject:
+C:         
=?windows-1256?Q?=5BInvitation=5D_ApacheCon_Europe_2008=21_=40_Mon_7_Apr_=96_?=
+C:         =?windows-1256?Q?Fri_11_Apr_2008_=28=29?=
+C: From: Robert Burrell Donkin <[email protected]>
+C: To: [email protected]
+C: Content-Type: multipart/mixed; boundary=00163600d06e04482dd6a10e458cd80be
+C: X-Virus-Checked: Checked by ClamAV on apache.org
+C: X-Nonspam: None
+C: X-fetched-from: mail.xmlmapt.org
+C: X-Evolution-Source: imap://rob@thebes/
+C: 
+C: 
+C: --00163600d06e04482dd6a10e458cd80be
+C: Content-Type: multipart/alternative;  
boundary=00163600d06e04482dd6a10e408cd80bd
+C: 
+C: 
+C: --00163600d06e04482dd6a10e408cd80bd
+C: Content-Type: text/plain; charset=windows-1256
+C: Content-Transfer-Encoding: quoted-printable
+C: 
+C: [email protected], you are invited to
+C: 
+C: Title: ApacheCon Europe 2008!
+C: Time: Mon 7 Apr =96 Fri 11 Apr 2008 (Time zone: London)
+C: Where: Amsterdam
+C: Calendar: 
+C: Description: Ah yes!On Tue, Mar 11, 2008 at 6:45 PM, Robert Burrell Donkin 
&=
+C: lt;[email protected]&gt; wrote:&gt; O! lest the world 
sho=
+C: uld task you to recite&gt; &nbsp;What merit lived in me, that you should 
lov=
+C: e&gt; &nbsp;After my death,--dear love, forget me quite,&gt; &nbsp;For you 
i=
+C: n me can nothing worthy prove;&gt; &nbsp;Unless you would devise some 
virtuo=
+C: us lie,&gt; &nbsp;To do more for me than mine own desert,&gt; &nbsp;And 
hang=
+C:  more praise upon deceased I&gt; &nbsp;Than niggard truth would willingly 
im=
+C: part:&gt; &nbsp;O! lest your true love may seem false in this&gt; 
&nbsp;That=
+C:  you for love speak well of me untrue,&gt; &nbsp;My name be buried where my 
=
+C: body is,&gt; &nbsp;And live no more to shame nor me nor you.&gt; &nbsp; For 
=
+C: I am shamed by that which I bring forth,&gt; &nbsp; And so should you, to 
lo=
+C: ve things nothing worth.&gt; &nbsp;
+C: 
+C: You can view this event at 
http://www.google.com/calendar/event?action=3DVIE=
+C: 
W&eid=3DaTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&tok=3DM=
+C: 
jkjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhOTRmOTJjO=
+C: Tg0Nzg2N2E4NTk4NWM5&ctz=3DEurope%2FLondon&hl=3Den_GB
+C: 
+C: 
+C: 
+C: You are receiving this courtesy email at the account [email protected] 
beca=
+C: use you are an attendee of this event.
+C: 
+C: To stop receiving future notifications for this event, decline this event. 
A=
+C: lternatively, you can sign up for a Google Calendar account at 
http://www.go=
+C: ogle.com/calendar/ and control your notification settings for your entire 
ca=
+C: lendar.
+C: --00163600d06e04482dd6a10e408cd80bd
+C: Content-Type: text/html; charset=windows-1256
+C: Content-Transfer-Encoding: quoted-printable
+C: 
+C: <div style=3D"padding:10px 7px; font-size:12px; line-height:1.4 
font-family:=
+C: Arial,Sans-serif; text-align:center;"><div><a 
href=3D"http://www.google.com/=
+C: calendar/"><img style=3D"border-width:0" 
src=3D"http://www.google.com/calend=
+C: ar/images/blue_beta_en-GB.gif" alt=3D"Google Calendar"></a></div>
+C: <div style=3D"width:370px; background:#D2E6D2; border-style:solid;       
bor=
+C: der-color:#ccc; border-width:1px 1px 0 1px; padding:15px 15px 5px 15px;     
=
+C:   margin:0 auto"><p style=3D"margin:0;color:#0">[email protected],
+C: you are invited to</p>
+C: <h2 style=3D"margin:5px 0; font-size:18px; 
line-height:1.4;color:#0">ApacheC=
+C: on Europe 2008!</h2>
+C: <p style=3D"margin:0 0 .5em;"><span style=3D"color:#0">Mon 7 Apr =96 Fri 11 
=
+C: Apr 2008</span>
+C: <br>
+C: <span style=3D"color:#676;">(Time zone:
+C: London)</span>
+C: <br>
+C: <span style=3D"color:#0">Amsterdam (<a 
href=3D"http://maps.google.co.uk/maps=
+C: ?q=3DAmsterdam&amp;hl=3Den-GB">map</a>)</span>
+C: <br>
+C: <span style=3D"color:#0">Calendar:
+C: </span></p>
+C: <p style=3D"margin:0 0 1em;color:#0; white-space:pre-wrap !important; 
white-=
+C: space:-moz-pre-wrap !important; white-space:-pre-wrap !important; 
white-spac=
+C: e:-o-pre-wrap !important; white-space:pre; 
word-wrap:break-word;">&lt;b&gt;&=
+C: lt;span style=3D&quot;font-family: trebuchet ms,sans-serif;&quot;&gt;Ah 
yes!=
+C: &lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;On Tue, Mar 11, 2008 at 6:45 PM, 
=
+C: Robert Burrell Donkin &amp;lt;[email protected]&amp;gt; 
w=
+C: rote:&lt;br&gt;&amp;gt; O! lest the world should task you to 
recite&lt;br&gt=
+C: ;&amp;gt; &amp;nbsp;What merit lived in me, that you should 
love&lt;br&gt;&a=
+C: mp;gt; &amp;nbsp;After my death,--dear love, forget me 
quite,&lt;br&gt;&amp;=
+C: gt; &amp;nbsp;For you in me can nothing worthy prove;&lt;br&gt;&amp;gt; 
&amp=
+C: ;nbsp;Unless you would devise some virtuous lie,&lt;br&gt;&amp;gt; 
&amp;nbsp=
+C: ;To do more for me than mine own desert,&lt;br&gt;&amp;gt; &amp;nbsp;And 
han=
+C: g more praise upon deceased I&lt;br&gt;&amp;gt; &amp;nbsp;Than niggard 
truth=
+C:  would willingly impart:&lt;br&gt;&amp;gt; &amp;nbsp;O! lest your true love 
=
+C: may seem false in this&lt;br&gt;&amp;gt; &amp;nbsp;That you for love speak 
w=
+C: ell of me untrue,&lt;br&gt;&amp;gt; &amp;nbsp;My name be buried where my 
bod=
+C: y is,&lt;br&gt;&amp;gt; &amp;nbsp;And live no more to shame nor me nor 
you.&=
+C: lt;br&gt;&amp;gt; &amp;nbsp; For I am shamed by that which I bring 
forth,&lt=
+C: ;br&gt;&amp;gt; &amp;nbsp; And so should you, to love things nothing 
worth.&=
+C: lt;br&gt;&amp;gt; &amp;nbsp;&lt;br&gt;&lt;br&gt;<br><a 
href=3D"http://www.go=
+C: 
ogle.com/calendar/event?action=3DVIEW&amp;eid=3DaTEya3NjNGhyNXV1ZDFnczlkc29z=
+C: 
MWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&amp;tok=3DMjkjcm9iZXJ0YnVycmVsbGRvbmtpbkBnb=
+C: 
WFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhOTRmOTJjOTg0Nzg2N2E4NTk4NWM5&amp;ctz=3DEu=
+C: rope%2FLondon&amp;hl=3Den_GB">More event details&raquo;</a></p>
+C: <div style=3D"margin:.5em 0 0; text-align:center;color:#0"><strong>Will you 
=
+C: attend?</strong></div>
+C: <div style=3D"margin:4px 0 0; text-align:center;"><span 
style=3D"background:=
+C: #fff; border:1px solid #676;              padding:3px 5px; 
line-height:1.5;"=
+C: ><a 
href=3D"http://www.google.com/calendar/event?action=3DRESPOND&amp;eid=3D=
+C: 
aTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&amp;rst=3D1&amp=
+C: 
;tok=3DMjkjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhO=
+C: 
TRmOTJjOTg0Nzg2N2E4NTk4NWM5&amp;ctz=3DEurope%2FLondon&amp;hl=3Den_GB">Yes</a=
+C: >
+C: |<a 
href=3D"http://www.google.com/calendar/event?action=3DRESPOND&amp;eid=3D=
+C: 
aTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&amp;rst=3D2&amp=
+C: 
;tok=3DMjkjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhO=
+C: 
TRmOTJjOTg0Nzg2N2E4NTk4NWM5&amp;ctz=3DEurope%2FLondon&amp;hl=3Den_GB">No</a>=
+C: 
+C: |<a 
href=3D"http://www.google.com/calendar/event?action=3DRESPOND&amp;eid=3D=
+C: 
aTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&amp;rst=3D3&amp=
+C: 
;tok=3DMjkjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhO=
+C: 
TRmOTJjOTg0Nzg2N2E4NTk4NWM5&amp;ctz=3DEurope%2FLondon&amp;hl=3Den_GB">Maybe<=
+C: /a></span></div></div>
+C: <div><img src=3D"http://www.google.com/calendar/images/envelope.gif"; style=
+C: =3D"background:#D2E6D2; width:420px height:95px" alt=3D""></div><p 
style=3D"=
+C: margin:-15px 0 0;">&nbsp;</p>
+C: <p style=3D"color:#676;">You are receiving this courtesy email at the 
accoun=
+C: t [email protected] because you are an attendee of this event.</p><p style=
+C: =3D"color:#676;">To stop receiving future notifications for this event, 
decl=
+C: ine this event. Alternatively, you can sign up for a Google Calendar 
account=
+C:  at http://www.google.com/calendar/ and control your notification settings 
f=
+C: or your entire calendar.</p></div>
+C: --00163600d06e04482dd6a10e408cd80bd
+C: Content-Type: text/calendar; charset=windows-1256; method=REQUEST
+C: Content-Transfer-Encoding: 7bit
+C: 
+C: BEGIN:VCALENDAR
+C: PRODID:-//Google Inc//Google Calendar 70.9054//EN
+C: VERSION:2.0
+C: CALSCALE:GREGORIAN
+C: METHOD:REQUEST
+C: BEGIN:VEVENT
+C: DTSTART;VALUE=DATE:20080407
+C: DTEND;VALUE=DATE:20080412
+C: DTSTAMP:20080311T185338Z
+C: ORGANIZER;CN=Robert Burrell Donkin:MAILTO:[email protected]
+C: UID:[email protected]
+C: ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
+C:  TRUE;X-NUM-GUESTS=0:MAILTO:[email protected]
+C: CLASS:PRIVATE
+C: CREATED:20080311T185337Z
+C: DESCRIPTION:<b><span style="font-family: trebuchet ms\,sans-serif\;">Ah yes
+C:  !</span></b><br><br>On Tue\, Mar 11\, 2008 at 6:45 PM\, Robert Burrell Donk
+C:  in &lt\;[email protected]&gt\; wrote:<br>&gt\; O! lest t
+C:  he world should task you to recite<br>&gt\; &nbsp\;What merit lived in me\,
+C:   that you should love<br>&gt\; &nbsp\;After my death\,--dear love\, forget 
+C:  me quite\,<br>&gt\; &nbsp\;For you in me can nothing worthy prove\;<br>&gt\
+C:  ; &nbsp\;Unless you would devise some virtuous lie\,<br>&gt\; &nbsp\;To do 
+C:  more for me than mine own desert\,<br>&gt\; &nbsp\;And hang more praise upo
+C:  n deceased I<br>&gt\; &nbsp\;Than niggard truth would willingly impart:<br>
+C:  &gt\; &nbsp\;O! lest your true love may seem false in this<br>&gt\; &nbsp\;
+C:  That you for love speak well of me untrue\,<br>&gt\; &nbsp\;My name be buri
+C:  ed where my body is\,<br>&gt\; &nbsp\;And live no more to shame nor me nor 
+C:  you.<br>&gt\; &nbsp\; For I am shamed by that which I bring forth\,<br>&gt\
+C:  ; &nbsp\; And so should you\, to love things nothing worth.<br>&gt\; &nbsp\
+C:  ;<br><br>\nView your event at http://www.google.com/calendar/event?action=V
+C:  IEW&eid=aTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&tok=Mj
+C:  kjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhOTRmOTJjO
+C:  Tg0Nzg2N2E4NTk4NWM5&ctz=Europe%2FLondon&hl=en_GB.
+C: LAST-MODIFIED:20080311T185337Z
+C: LOCATION:Amsterdam
+C: SEQUENCE:0
+C: STATUS:CONFIRMED
+C: SUMMARY:ApacheCon Europe 2008!
+C: TRANSP:OPAQUE
+C: END:VEVENT
+C: END:VCALENDAR
+C: 
+C: --00163600d06e04482dd6a10e408cd80bd--
+C: 
+C: --00163600d06e04482dd6a10e458cd80be
+C: Content-Type: application/ics; name="invite.ics"
+C: Content-Disposition: attachment; filename="invite.ics"
+C: Content-Transfer-Encoding: 7bit
+C: 
+C: BEGIN:VCALENDAR
+C: PRODID:-//Google Inc//Google Calendar 70.9054//EN
+C: VERSION:2.0
+C: CALSCALE:GREGORIAN
+C: METHOD:REQUEST
+C: BEGIN:VEVENT
+C: DTSTART;VALUE=DATE:20080407
+C: DTEND;VALUE=DATE:20080412
+C: DTSTAMP:20080311T185338Z
+C: ORGANIZER;CN=Robert Burrell Donkin:MAILTO:[email protected]
+C: UID:[email protected]
+C: ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
+C:  TRUE;X-NUM-GUESTS=0:MAILTO:[email protected]
+C: CLASS:PRIVATE
+C: CREATED:20080311T185337Z
+C: DESCRIPTION:<b><span style="font-family: trebuchet ms\,sans-serif\;">Ah yes
+C:  !</span></b><br><br>On Tue\, Mar 11\, 2008 at 6:45 PM\, Robert Burrell Donk
+C:  in &lt\;[email protected]&gt\; wrote:<br>&gt\; O! lest t
+C:  he world should task you to recite<br>&gt\; &nbsp\;What merit lived in me\,
+C:   that you should love<br>&gt\; &nbsp\;After my death\,--dear love\, forget 
+C:  me quite\,<br>&gt\; &nbsp\;For you in me can nothing worthy prove\;<br>&gt\
+C:  ; &nbsp\;Unless you would devise some virtuous lie\,<br>&gt\; &nbsp\;To do 
+C:  more for me than mine own desert\,<br>&gt\; &nbsp\;And hang more praise upo
+C:  n deceased I<br>&gt\; &nbsp\;Than niggard truth would willingly impart:<br>
+C:  &gt\; &nbsp\;O! lest your true love may seem false in this<br>&gt\; &nbsp\;
+C:  That you for love speak well of me untrue\,<br>&gt\; &nbsp\;My name be buri
+C:  ed where my body is\,<br>&gt\; &nbsp\;And live no more to shame nor me nor 
+C:  you.<br>&gt\; &nbsp\; For I am shamed by that which I bring forth\,<br>&gt\
+C:  ; &nbsp\; And so should you\, to love things nothing worth.<br>&gt\; &nbsp\
+C:  ;<br><br>\nView your event at http://www.google.com/calendar/event?action=V
+C:  IEW&eid=aTEya3NjNGhyNXV1ZDFnczlkc29zMWlwajggcmRvbmtpbkBhcGFjaGUub3Jn&tok=Mj
+C:  kjcm9iZXJ0YnVycmVsbGRvbmtpbkBnbWFpbC5jb21mODRkNmZkODg5MjQzNGE2NDNhOTRmOTJjO
+C:  Tg0Nzg2N2E4NTk4NWM5&ctz=Europe%2FLondon&hl=en_GB.
+C: LAST-MODIFIED:20080311T185337Z
+C: LOCATION:Amsterdam
+C: SEQUENCE:0
+C: STATUS:CONFIRMED
+C: SUMMARY:ApacheCon Europe 2008!
+C: TRANSP:OPAQUE
+C: END:VEVENT
+C: END:VCALENDAR
+C: 
+C: --00163600d06e04482dd6a10e458cd80be--
+C: 
+C: 
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A20 OK (\[.+\] )?APPEND completed\.
+C: A125 SEARCH SUBJECT o
+S: \* SEARCH 1
+S: A125 OK SEARCH completed\.
+C: A126 SEARCH SUBJECT the
+S: \* SEARCH
+S: A126 OK SEARCH completed\.
+C: A127 SEARCH SUBJECT "nothing worthy prove"
+S: \* SEARCH
+S: A127 OK SEARCH completed\.
+C: A128 SEARCH SUBJECT thy
+S: \* SEARCH
+S: A128 OK SEARCH completed\.
+C: A150 DELETE testmailbox
+S: A150 OK Delete completed\.
+C: A151 LOGOUT
+S: \* BYE Logging out
+S: A151 OK Logout completed\.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Concurrent.todo.txt
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Concurrent.todo.txt?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Concurrent.todo.txt
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Concurrent.todo.txt
 Fri May 29 05:16:50 2015
@@ -0,0 +1,57 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+#
+Simple tests:
+FETCH should set the /SEEN flag, and this should be propogated to other 
sessions.
+
+3.4. The server MAY allow the RENAME of a multi-accessed mailbox by
+     simply changing the name attribute on the mailbox.
+
+-----------------------------------------------------------------------
+4.1. Fetching of expunged messages
+
+4.1.2 The server MAY allow the EXPUNGE of a multi-accessed mailbox,
+      and on subsequent FETCH commands return FETCH responses only for
+      non-expunged messages and a tagged NO.
+
+             C2: B001 FETCH 3:5 ENVELOPE
+             S2: * 3 FETCH ENVELOPE . . . (ENVELOPE info returned)
+             S2: B001 NO Some of the requested messages no longer exist
+### Return what you can, and send a "no": i like this.
+-0---------------------------------------------------------------------
+
+4.2. Storing of expunged messages
+
+4.2.1 If the ".SILENT" suffix is used, and the STORE completed
+      successfully for all the non-expunged messages, the server SHOULD
+      return a tagged OK.
+
+4.2.2. If the ".SILENT" suffix is not used, and only expunged messages
+       are referenced, the server SHOULD return only a tagged NO.
+
+4.2.3. If the ".SILENT" suffix is not used, and a mixture of expunged
+       and non-expunged messages are referenced, the server MAY set the
+       flags and return a FETCH response for the non-expunged messages
+       along with a tagged NO.
+### Update what you can, and return "NO"
+
+4.2.4. If the ".SILENT" suffix is not used, and a mixture of expunged
+       and non-expunged messages are referenced, the server MAY return
+       an untagged NO and not set any flags.
+### Don't update anything, and return "NO"
\ No newline at end of file

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentCrossExpunge.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentCrossExpunge.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentCrossExpunge.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentCrossExpunge.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,108 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+SESSION: 1
+C: 1a CREATE alpha
+S: 1a OK CREATE completed.
+
+C: 1b APPEND alpha (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 01
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 01
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1b APPEND alpha {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 02
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 02
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1c APPEND alpha (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1c OK (\[.+\] )?APPEND completed.
+
+C: 1d APPEND alpha {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 04
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 04
+C:
+S: 1d OK (\[.+\] )?APPEND completed.
+
+C: 1e SELECT alpha
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 4 EXISTS
+S: \* 4 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 1e OK \[READ-WRITE\] SELECT completed.
+
+C: 1g STORE 1 FLAGS (\Deleted)
+S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: 1g OK STORE completed.
+C: 1h STORE 3 FLAGS (\Deleted)
+S: \* 3 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: 1h OK STORE completed.
+
+SESSION: 2
+C: 2e SELECT alpha
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 4 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 2e OK \[READ-WRITE\] SELECT completed.
+
+C: 2f EXPUNGE
+S: \* 1 EXPUNGE
+S: \* 2 EXPUNGE
+S: 2f OK EXPUNGE completed.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentDeleteSelected.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentDeleteSelected.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentDeleteSelected.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentDeleteSelected.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,62 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+#From RFC2180
+#3. Deletion/Renaming of a multi-accessed mailbox
+#3.3. The server MAY allow the DELETE/RENAME of a multi-accessed
+#     mailbox, but disconnect all other clients who have the mailbox
+#     accessed by sending a untagged BYE response.
+
+SESSION: 1
+C: 1a CREATE deleteconcurrent
+S: 1a OK CREATE completed.
+
+C: 1b APPEND deleteconcurrent (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1c SELECT deleteconcurrent
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 2\].*
+S: 1c OK \[READ-WRITE\] SELECT completed.
+
+
+# Client #1 has mailbox "deleteconcurrent" selected. Client #2 DELETEs the 
mailbox.
+SESSION: 2
+C: 2a DELETE deleteconcurrent
+S: 2a OK DELETE completed.
+
+# Forced disconnect of selected sessions
+SESSION: 1
+C: 1A NOOP
+S: \* BYE Selected mailbox has been deleted

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExistsResponse.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExistsResponse.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExistsResponse.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExistsResponse.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,113 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+# Tests that appending a message from one session triggers an EXISTS and 
RECENT response
+# in a concurrent session on the same mailbox
+SESSION: 1
+C: 1a CREATE existsresponse
+S: 1a OK CREATE completed.
+
+C: 1b STATUS existsresponse (MESSAGES)
+S: \* STATUS \"existsresponse\" \(MESSAGES 0\)
+S: 1b OK STATUS completed.
+
+SESSION: 2
+C: 2a SELECT existsresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: 2a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 3
+C: 3a SELECT existsresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: 3a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 4
+C: 4a SELECT existsresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: 4a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 1
+C: 1c APPEND existsresponse {310+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: afternoon meeting
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Hello Joe, do you think we can meet at 3:30 tomorrow?
+C:
+S: 1c OK (\[.+\] )?APPEND completed.
+
+C: 1b STATUS existsresponse (MESSAGES RECENT)
+S: \* STATUS \"existsresponse\" \(MESSAGES 1 RECENT 1\)
+S: 1b OK STATUS completed.
+
+# EXISTS response on NOOP
+SESSION: 2
+C: 2b NOOP
+S: \* 1 EXISTS
+S: \* 0 RECENT
+S: 2b OK NOOP completed.
+
+C: 2c CLOSE
+S: 2c OK CLOSE completed.
+
+# EXISTS response on STORE (recent is no longer set)
+SESSION: 3
+C: 3b STORE 1 +FLAGS.SILENT (\Flagged)
+S: \* 1 EXISTS
+S: \* 0 RECENT
+S: 3b OK STORE completed.
+
+C: 3c CLOSE
+S: 3c OK CLOSE completed.
+
+# EXISTS response on CREATE
+SESSION: 4
+C: 4b CREATE another
+S: \* 1 EXISTS
+S: \* 0 RECENT
+S: \* 1 FETCH \(FLAGS \(\\Flagged\)\)
+S: 4b OK CREATE completed.
+
+C: 4c DELETE another
+S: 4c OK DELETE completed.
+
+C: 4c DELETE existsresponse
+S: 4c OK DELETE completed.
+

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExpungeResponse.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExpungeResponse.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExpungeResponse.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentExpungeResponse.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,167 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+SESSION: 1
+C: 1a CREATE expungeresponse
+S: 1a OK CREATE completed.
+
+C: 1b APPEND expungeresponse (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 01
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 01
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1b APPEND expungeresponse {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 02
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 02
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1c APPEND expungeresponse (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1c OK (\[.+\] )?APPEND completed.
+
+C: 1d APPEND expungeresponse {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 04
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 04
+C:
+S: 1d OK (\[.+\] )?APPEND completed.
+
+C: 1e SELECT expungeresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 4 EXISTS
+S: \* 4 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 1e OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 2
+C: 2a SELECT expungeresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 4 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 2a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 3
+C: 3a SELECT expungeresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 4 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 3a OK \[READ-WRITE\] SELECT completed.
+
+# Do an expunge with session 1
+SESSION: 1
+C: 1f EXPUNGE
+S: \* 1 EXPUNGE
+S: \* 2 EXPUNGE
+S: \* 2 RECENT
+S: 1f OK EXPUNGE completed.
+
+# Make sure session 2 gets expunge responses
+SESSION: 2
+C: 2b NOOP
+S: \* 1 EXPUNGE
+S: \* 2 EXPUNGE
+S: 2b OK NOOP completed.
+
+# Now select with a new session - we have sessions 2,3 and 4 in different 
states
+SESSION: 4
+C: 4a SELECT expungeresponse
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 2 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 5\].*
+S: 4a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 1
+C: 1g STORE 1 FLAGS (\Deleted)
+S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: 1g OK STORE completed.
+C: 1h EXPUNGE
+S: \* 1 EXPUNGE
+S: \* 1 RECENT
+S: 1h OK EXPUNGE completed.
+
+SESSION: 2
+C: 2c NOOP
+S: \* 1 EXPUNGE
+S: 2c OK NOOP completed.
+
+SESSION: 3
+C: 3b NOOP
+S: \* 1 EXPUNGE
+S: \* 1 EXPUNGE
+S: \* 1 EXPUNGE
+S: 3b OK NOOP completed.
+
+SESSION: 4
+C: 4b NOOP
+S: \* 1 EXPUNGE
+S: 4b OK NOOP completed.
+
+C: A150 DELETE expungeresponse
+S: A150 OK DELETE completed\.
+
+

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentFetchResponse.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentFetchResponse.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentFetchResponse.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentFetchResponse.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,160 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+# Tests that updates made by one session trigger a fetch response
+# in a concurrent session on the same mailbox
+SESSION: 1
+C: 1a CREATE multibox
+S: 1a OK CREATE completed.
+
+C: 1b STATUS multibox (MESSAGES)
+S: \* STATUS "multibox" \(MESSAGES 0\)
+S: 1b OK STATUS completed.
+
+C: 1c APPEND multibox {310+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: afternoon meeting
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Hello Joe, do you think we can meet at 3:30 tomorrow?
+C:
+S: 1c OK (\[.+\] )?APPEND completed.
+
+C: 1c APPEND multibox {312+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: afternoon meeting 2
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Hello Joe, do you think we can meet at 3:30 tomorrow?
+C:
+S: 1c OK (\[.+\] )?APPEND completed.
+
+C: 1d SELECT multibox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 2 EXISTS
+S: \* 2 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 3\].*
+S: 1d OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 2
+C: 2a SELECT multibox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 2 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 3\].*
+S: 2a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 3
+C: 3a SELECT multibox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 2 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 3\].*
+S: 3a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 4
+C: 4a SELECT multibox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 2 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 3\].*
+S: 4a OK \[READ-WRITE\] SELECT completed.
+
+SESSION: 1
+C: 1e STORE 1 FLAGS (\Flagged)
+S: \* 1 FETCH \(FLAGS \(\\Flagged \\Recent\)\)
+S: 1e OK STORE completed.
+
+# On NOOP, we get the Fetch Response from the Session1 update.
+SESSION: 2
+C: 2b NOOP
+S: \* 1 FETCH \(FLAGS \(\\Flagged\)\)
+S: 2b OK NOOP completed.
+
+# On STORE, we get the Fetch Response from the Session1 update.
+SESSION: 3
+C: 3b COPY 2 inbox
+S: \* 1 FETCH \(FLAGS \(\\Flagged\)\)
+S: 3b OK (\[.+\] )?COPY completed.
+
+# Update another flag, this time SILENT 
+# Still get notifications on *other* sessions, but not this one.
+SESSION: 1
+C: 1e STORE 2 FLAGS.SILENT (\Flagged)
+S: 1e OK STORE completed.
+
+# We should only get one flag notification on SESSION 2,
+# but 2 notifications on SESSION 4.
+SESSION: 2
+C: 2b NOOP
+S: \* 2 FETCH \(FLAGS \(\\Flagged\)\)
+S: 2b OK NOOP completed.
+
+# On CREATE, we get the Fetch Response from both of the Session1 updates.
+SESSION: 4
+C: 4b CREATE another
+S: \* 1 FETCH \(FLAGS \(\\Flagged\)\)
+S: \* 2 FETCH \(FLAGS \(\\Flagged\)\)
+S: 4b OK CREATE completed.
+
+C: 4c DELETE another
+S: 4c OK DELETE completed.
+
+SESSION: 1
+C: 1f CLOSE
+S: 1f OK CLOSE completed.
+
+SESSION: 2
+C: 2c CLOSE
+S: 2c OK CLOSE completed.
+
+SESSION: 3
+C: 3c CLOSE
+S: 3c OK CLOSE completed.
+
+SESSION: 4
+C: 4c CLOSE
+S: 4c OK CLOSE completed.
+
+SESSION: 1
+C: 1g DELETE multibox
+S: 1g OK DELETE completed.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelected.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelected.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelected.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelected.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,79 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+#From RFC2180
+#3. Deletion/Renaming of a multi-accessed mailbox
+#3.4. The server MAY allow the RENAME of a multi-accessed mailbox by
+#     simply changing the name attribute on the mailbox.
+
+SESSION: 1
+C: 1a CREATE renameconcurrent
+S: 1a OK CREATE completed.
+
+C: 1b APPEND renameconcurrent (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1c SELECT renameconcurrent
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 2\].*
+S: 1c OK \[READ-WRITE\] SELECT completed.
+
+
+# Client #1 has mailbox "renameconcurrent" selected. Client #2 RENAMEs the 
mailbox.
+SESSION: 2
+C: 2a RENAME renameconcurrent renamed
+S: 2a OK RENAME completed.
+
+# Client #1 is still able to do operations that do not reference the mailbox 
name.
+SESSION: 1
+C: 1d FETCH 1:* (FLAGS)
+S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: 1d OK FETCH completed.
+
+# Client #1 is not able to do operations that reference the mailbox name.
+C: 1e APPEND renameconcurrent (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1e NO \[TRYCREATE\] APPEND failed. No such mailbox.
+
+C: A150 DELETE renamed
+S: A150 OK DELETE completed\.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelectedSub.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelectedSub.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelectedSub.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ConcurrentRenameSelectedSub.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,78 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+#From RFC2180
+#3. Deletion/Renaming of a multi-accessed mailbox
+#3.4. The server MAY allow the RENAME of a multi-accessed mailbox by
+#     simply changing the name attribute on the mailbox.
+
+SESSION: 1
+C: 1a CREATE parent
+S: 1a OK CREATE completed.
+C: 1a CREATE parent.child
+S: 1a OK CREATE completed.
+
+C: 1b APPEND parent.child (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1b OK (\[.+\] )?APPEND completed.
+
+C: 1c SELECT parent.child
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 2\].*
+S: 1c OK \[READ-WRITE\] SELECT completed.
+
+
+# Client #1 has mailbox "parent.child" selected. Client #2 RENAMEs the oarent 
mailbox.
+SESSION: 2
+C: 2a RENAME parent renamed
+S: 2a OK RENAME completed.
+
+# Client #1 is still able to do operations that do not reference the mailbox 
name.
+SESSION: 1
+C: 1d FETCH 1:* (FLAGS)
+S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: 1d OK FETCH completed.
+
+# Client #1 is not able to do operations that reference the mailbox name.
+C: 1e APPEND parent.child (\Deleted) {254+}
+C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+C: From: Fred Foobar <[email protected]>
+C: Subject: Test 03
+C: To: [email protected]
+C: Message-Id: <[email protected]>
+C: MIME-Version: 1.0
+C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+C:
+C: Test 03
+C:
+S: 1e NO \[TRYCREATE\] APPEND failed. No such mailbox.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Copy.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Copy.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Copy.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Copy.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,63 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+C: a1 CREATE copied
+S: a1 OK CREATE completed.
+
+C: a2 STATUS copied (MESSAGES)
+S: \* STATUS "copied" \(MESSAGES 0\)
+S: a2 OK STATUS completed.
+
+# mark one message as deleted before copying (to check that flags are copied)
+C: a3 STORE 3 FLAGS (\Deleted)
+S: \* 3 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: a3 OK STORE completed.
+
+# copy messages 2-4
+C: a4 COPY 2:4 copied
+S: a4 OK (\[.+\] )?COPY completed.
+
+# Check there's 3 messages in the copied mailbox
+C: a5 STATUS copied (MESSAGES)
+S: \* STATUS "copied" \(MESSAGES 3\)
+S: a5 OK STATUS completed.
+
+# Modify an original after copying, to ensure it's not the same message.
+C: a6 STORE 2 FLAGS (\Flagged)
+S: \* 2 FETCH \(FLAGS \(\\Flagged \\Recent\)\)
+S: a6 OK STORE completed.
+
+C: a7 SELECT copied
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 3 EXISTS
+S: \* \d+ RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT \d+\].*
+S: a7 OK \[READ-WRITE\] SELECT completed.
+
+C: a8 FETCH 1:3 (FLAGS)
+S: \* 1 FETCH \(FLAGS \(\\Recent\)\)
+S: \* 2 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
+S: \* 3 FETCH \(FLAGS \(\\Recent\)\)
+S: a8 OK FETCH completed.
+
+C: a9 DELETE copied
+S: a9 OK DELETE completed.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Create.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Create.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Create.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Create.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,81 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+# Create a simple name
+C: 10 CREATE test
+S: 10 OK CREATE completed.
+# Create a subfolder with simple name
+C: 11 CREATE test.subfolder
+S: 11 OK CREATE completed.
+# Create a fully qualified folder
+C: 12 CREATE test1
+S: 12 OK CREATE completed.
+# Create a fully qualified sub folder
+C: 13 CREATE test1.subfolder1
+S: 13 OK CREATE completed.
+# Create quoted
+C: 14 CREATE "Pepe juan"
+S: 14 OK CREATE completed.
+#
+# [email protected]
+# When mailbox name is suffixed with hierarchy separator
+# name created must remove tailing delimiter
+C: 15 CREATE another.test.
+S: 15 OK CREATE completed.
+C: 16 LIST "" another*
+S: \* LIST \(\\HasChildren\) "." "another"
+S: \* LIST \(\\HasNoChildren\) "." "another.test"
+S: 16 OK LIST completed.
+#
+# [email protected]
+# Intermediary mailboxes which don't exist should be created
+C: 17 CREATE alpha.beta.gamma
+S: 17 OK CREATE completed.
+C: 18 LIST "" alpha*
+S: \* LIST \(\\HasChildren\) "." "alpha"
+S: \* LIST \(\\HasChildren\) "." "alpha.beta"
+S: \* LIST \(\\HasNoChildren\) "." "alpha.beta.gamma"
+S: 18 OK LIST completed.
+
+#
+# When mailbox already exists, ensure message is user friendly
+#
+C: 19 CREATE alpha
+S: 19 NO CREATE failed. Mailbox already exists.
+
+# Cleanup
+C: a1 DELETE test1.subfolder1
+S: a1 OK DELETE completed.
+C: a1 DELETE test1
+S: a1 OK DELETE completed.
+C: a1 DELETE test.subfolder
+S: a1 OK DELETE completed.
+C: a1 DELETE test
+S: a1 OK DELETE completed.
+C: a10 DELETE "Pepe juan"
+S: a10 OK DELETE completed.
+C: a11 DELETE alpha.beta.gamma
+S: a11 OK DELETE completed.
+C: a11 DELETE alpha.beta
+S: a11 OK DELETE completed.
+C: a11 DELETE alpha
+S: a11 OK DELETE completed.
+C: a11 DELETE another.test
+S: a11 OK DELETE completed.
+C: a11 DELETE another
+S: a11 OK DELETE completed.
\ No newline at end of file

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Delete.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Delete.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Delete.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Delete.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,39 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+# Create a few folders
+C: 10 CREATE deletetest
+S: 10 OK CREATE completed.
+C: 11 CREATE deletetest.subfolder
+S: 11 OK CREATE completed.
+C: 12 CREATE deletetest1
+S: 12 OK CREATE completed.
+C: 13 CREATE deletetest1.subfolder1
+S: 13 OK CREATE completed.
+
+# Delete subfolder, then folder
+C: 10 DELETE deletetest.subfolder
+S: 10 OK DELETE completed.
+C: 11 DELETE deletetest
+S: 11 OK DELETE completed.
+
+# Delete folder first, then subfolder.
+C: 14 DELETE deletetest1.subfolder1
+S: 14 OK DELETE completed.
+C: 13 DELETE deletetest1
+S: 13 OK DELETE completed.
\ No newline at end of file

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ExamineEmpty.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ExamineEmpty.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ExamineEmpty.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/ExamineEmpty.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,70 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+# Create a few folders
+C: 10 CREATE test
+S: 10 OK CREATE completed.
+C: 11 CREATE test.subfolder
+S: 11 OK CREATE completed.
+C: 12 CREATE test1
+S: 12 OK CREATE completed.
+C: 13 CREATE test1.subfolder1
+S: 13 OK CREATE completed.
+
+C: abcd EXAMINE test
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: abcd OK \[READ-ONLY\] EXAMINE completed.
+
+C: abcd EXAMINE test.subfolder
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: abcd OK \[READ-ONLY\] EXAMINE completed.
+
+C: abcd EXAMINE test1
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( 
\\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: abcd OK \[READ-ONLY\] EXAMINE completed.
+
+C: abcd EXAMINE subfolder1
+S: abcd NO EXAMINE failed. No such mailbox.
+
+# Cleanup
+C: a1 DELETE test1.subfolder1
+S: a1 OK DELETE completed.
+C: a1 DELETE test1
+S: a1 OK DELETE completed.
+C: a1 DELETE test.subfolder
+S: a1 OK DELETE completed.
+C: a1 DELETE test
+S: a1 OK DELETE completed.

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Expunge.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Expunge.test?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Expunge.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Expunge.test
 Fri May 29 05:16:50 2015
@@ -0,0 +1,20 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+C: a1 EXPUNGE
+S: a1 OK EXPUNGE completed.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to