Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectEmpty.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectEmpty.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectEmpty.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectEmpty.test Fri May 29 05:16:50 2015 @@ -0,0 +1,72 @@ +################################################################ +# 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 SELECT 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-WRITE\] SELECT completed. + +C: abcd SELECT test.subfolder +SUB { +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-WRITE\] SELECT completed. + +C: abcd SELECT 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-WRITE\] SELECT completed. + +C: abcd SELECT subfolder1 +S: abcd NO SELECT 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/SelectInbox.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectInbox.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectInbox.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectInbox.test Fri May 29 05:16:50 2015 @@ -0,0 +1,27 @@ +################################################################ +# 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: abcd SELECT inbox +S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\) +S: \* \d+ EXISTS +S: \* \d+ 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-WRITE\] SELECT completed. Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectUnseen.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectUnseen.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectUnseen.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectUnseen.test Fri May 29 05:16:50 2015 @@ -0,0 +1,131 @@ +################################################################ +# 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: 10 CREATE selectappend +S: 10 OK CREATE completed. + +C: 10 CREATE another +S: 10 OK CREATE completed. + +C: 10 SELECT selectappend +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: 10 OK \[READ-WRITE\] SELECT completed. + +C: A003 APPEND selectappend {310} +# Use command continuation request +S: \+ +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: afternoon meeting 2 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Hello Joe, could we change that to 4:00pm tomorrow? +C: +S: \* 1 EXISTS +S: \* 1 RECENT +S: A003 OK (\[.+\] )?APPEND completed. + +C: A009 APPEND selectappend {310} +# Use command continuation request +S: \+ +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: afternoon meeting 2 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Hello Joe, could we change that to 4:00pm tomorrow? +C: +S: \* 2 EXISTS +S: \* 2 RECENT +S: A009 OK (\[.+\] )?APPEND completed. + +C: 20 SELECT another +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: 20 OK \[READ-WRITE\] SELECT completed. + +C: 21 SELECT selectappend +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: 21 OK \[READ-WRITE\] SELECT completed. + +C: 30 FETCH 1 BODY[] +S: \* 1 FETCH \(FLAGS \(\\Seen\) BODY\[\] \{310} +S: Date: Mon, 7 Feb 1994 21:52:25 -0800 \(PST\) +S: From: Fred Foobar <foo...@blurdybloop.com> +S: Subject: afternoon meeting 2 +S: To: mo...@owatagu.siam.edu +S: Message-Id: <b27397-0100...@blurdybloop.com> +S: MIME-Version: 1.0 +S: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +S: +S: Hello Joe, could we change that to 4:00pm tomorrow\? +S: \) +S: 30 OK FETCH completed. + +C: 30 SELECT another +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: 30 OK \[READ-WRITE\] SELECT completed. + +C: 40 SELECT selectappend +S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\) +S: \* 2 EXISTS +S: \* 0 RECENT +S: \* OK \[UIDVALIDITY \d+\].* +S: \* OK \[UNSEEN 2\].* +S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\].* +S: \* OK \[HIGHESTMODSEQ \d+\].* +S: \* OK \[UIDNEXT 3\].* +S: 40 OK \[READ-WRITE\] SELECT completed. + +C: a1 DELETE another +S: a1 OK DELETE completed. + +C: a1 DELETE selectappend +S: a1 OK DELETE completed. + + Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateCleanup.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateCleanup.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateCleanup.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateCleanup.test Fri May 29 05:16:50 2015 @@ -0,0 +1,24 @@ +################################################################ +# 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. # +################################################################ +# try to delete the select mailbox (don't worry about failures +C: a1 DELETE selected +S: .* + +C: a1 SELECT selected +S: a1 NO SELECT failed. No such mailbox. \ No newline at end of file Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateSetup.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateSetup.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateSetup.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SelectedStateSetup.test Fri May 29 05:16:50 2015 @@ -0,0 +1,84 @@ +################################################################ +# 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 selected +S: a1 OK CREATE completed. + +C: A003 APPEND selected {254+} +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: Test 01 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Test 01 +C: +S: A003 OK (\[.+\] )?APPEND completed. + +C: A004 APPEND selected {254+} +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: Test 02 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Test 02 +C: +S: A004 OK (\[.+\] )?APPEND completed. + +C: A005 APPEND selected {254+} +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: Test 03 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Test 03 +C: +S: A005 OK (\[.+\] )?APPEND completed. + +C: A006 APPEND selected {254+} +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: Test 04 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Test 04 +C: +S: A006 OK (\[.+\] )?APPEND completed. + +C: a1 SELECT selected +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: a1 OK \[READ-WRITE\] SELECT completed. + Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Status.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Status.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Status.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Status.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 statustest +S: a1 OK CREATE completed. + +# Tests for the STATUS command +C: a001 STATUS statustest (MESSAGES) +S: \* STATUS \"statustest\" \(MESSAGES 0\) +S: a001 OK STATUS completed. + +C: a002 STATUS statustest ( MESSAGES ) +S: \* STATUS \"statustest\" \(MESSAGES 0\) +S: a002 OK STATUS completed. + +C: a003 STATUS statustest (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN) +S: \* STATUS \"statustest\" \(MESSAGES 0 RECENT 0 UIDNEXT \d+ UIDVALIDITY \d+ UNSEEN 0\) +S: a003 OK STATUS completed. + +C: a004 STATUS statustest (UNSEEN RECENT ) +S: \* STATUS \"statustest\" \(RECENT 0 UNSEEN 0\) +S: a004 OK STATUS completed. + +C: A005 APPEND statustest {254+} +C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) +C: From: Fred Foobar <foo...@blurdybloop.com> +C: Subject: Test 01 +C: To: mo...@owatagu.siam.edu +C: Message-Id: <b27397-0100...@blurdybloop.com> +C: MIME-Version: 1.0 +C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII +C: +C: Test 01 +C: +S: A005 OK (\[.+\] )?APPEND completed. + +C: a006 STATUS statustest (UNSEEN RECENT ) +S: \* STATUS \"statustest\" \(RECENT 1 UNSEEN 1\) +S: a006 OK STATUS completed. + +# Make sure that the recent flag isn't unset +C: a007 STATUS statustest (UNSEEN RECENT ) +S: \* STATUS \"statustest\" \(RECENT 1 UNSEEN 1\) +S: a007 OK STATUS completed. + +# Cleanup +C: a1 DELETE statustest +S: a1 OK DELETE completed. Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Store.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Store.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Store.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Store.test Fri May 29 05:16:50 2015 @@ -0,0 +1,71 @@ +################################################################ +# 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. # +################################################################ +# FLAGS +C: f1 FETCH 1:4 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Recent\)\) +S: \* 2 FETCH \(FLAGS \(\\Recent\)\) +S: \* 3 FETCH \(FLAGS \(\\Recent\)\) +S: \* 4 FETCH \(FLAGS \(\\Recent\)\) +S: f1 OK FETCH completed. + +#Simple store +C: f2 STORE 1 FLAGS (\Deleted) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\) +S: f2 OK STORE completed. + +C: f3 FETCH 1 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\) +S: f3 OK FETCH completed. + +#Override previous value (silent) +C: f2 STORE 1 FLAGS.SILENT (\Draft \Flagged) +S: f2 OK STORE completed. + +C: f1 FETCH 1 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Draft \\Flagged \\Recent\)\) +S: f1 OK FETCH completed. + +#Add to existing flags +C: f2 STORE 1 +FLAGS (\Deleted) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Draft \\Flagged \\Recent\)\) +S: f2 OK STORE completed. + +C: f1 FETCH 1 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Draft \\Flagged \\Recent\)\) +S: f1 OK FETCH completed. + +#Remove from existing flags (silent) +C: f2 STORE 1 -FLAGS.SILENT (\Draft) +S: f2 OK STORE completed. + +C: f1 FETCH 1 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Flagged \\Recent\)\) +S: f1 OK FETCH completed. + +C: f4 STORE 3:4 FLAGS (\Flagged) +S: \* 3 FETCH \(FLAGS \(\\Flagged \\Recent\)\) +S: \* 4 FETCH \(FLAGS \(\\Flagged \\Recent\)\) +S: f4 OK STORE completed. + +C: f1 FETCH 1:4 (FLAGS) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Flagged \\Recent\)\) +S: \* 2 FETCH \(FLAGS \(\\Recent\)\) +S: \* 3 FETCH \(FLAGS \(\\Flagged \\Recent\)\) +S: \* 4 FETCH \(FLAGS \(\\Flagged \\Recent\)\) +S: f1 OK FETCH completed. Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/StringArgs.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/StringArgs.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/StringArgs.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/StringArgs.test Fri May 29 05:16:50 2015 @@ -0,0 +1,65 @@ +################################################################ +# 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. # +################################################################ +# The following tests check the parsing of string arguments of various formats. +# The STATUS command is used for testing all types of string arguments. + +# The <mailbox> argument of the STATUS command is of type "mailbox", which +# may be either (case-insensitive) "INBOX" or an "astring". "astring", in turn, +# may be an "atom", a "quoted" string, or a "literal" ( format "{xxx[+]}\nXXXX" ) + +# INBOX special case +C: a001 STATUS INBOX (MESSAGES) +S: \* STATUS \"INBOX\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# Case-insensitive inbox +C: a001 STATUS InBoX (MESSAGES) +S: \* STATUS \"INBOX\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# Tests with an atomic mailbox name. +C: a1 CREATE atomMailbox +S: a1 OK CREATE completed. + +# atom +C: a001 STATUS atomMailbox (MESSAGES) +S: \* STATUS \"atomMailbox\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# quoted +C: a001 STATUS "atomMailbox" (MESSAGES) +S: \* STATUS \"atomMailbox\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# non-synchronized literal +C: a001 STATUS {11} +S: \+ +C: atomMailbox (MESSAGES) +S: \* STATUS \"atomMailbox\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# synchronized literal +C: a001 STATUS {11+} +C: atomMailbox (MESSAGES) +S: \* STATUS \"atomMailbox\" \(MESSAGES \d+\) +S: a001 OK STATUS completed. + +# Cleanup +C: a1 DELETE atomMailbox +S: a1 OK DELETE completed. Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Subscribe.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Subscribe.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Subscribe.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Subscribe.test Fri May 29 05:16:50 2015 @@ -0,0 +1,97 @@ +################################################################ +# 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 subscribetest +S: 10 OK CREATE completed. +C: 11 CREATE subscribetest.subfolder +S: 11 OK CREATE completed. +C: 12 CREATE subscribetest1 +S: 12 OK CREATE completed. +C: 13 CREATE subscribetest1.subfolder1 +S: 13 OK CREATE completed. + +C: a01 LSUB "" "*" +S: a01 OK LSUB completed. + +C: a02 SUBSCRIBE subscribetest +S: a02 OK SUBSCRIBE completed. + +C: a03 LSUB "" "*" +S: \* LSUB \(\) \"\.\" \"subscribetest\" +S: a03 OK LSUB completed. + +C: a04 SUBSCRIBE subscribetest.subfolder +S: a04 OK SUBSCRIBE completed. + +C: a05 SUBSCRIBE subscribetest1.subfolder1 +S: a05 OK SUBSCRIBE completed. + +# LIST All subscribed +C: a06 LSUB "" "*" +SUB { +S: \* LSUB \(\) \"\.\" \"subscribetest\" +S: \* LSUB \(\) \"\.\" \"subscribetest\.subfolder\" +S: \* LSUB \(\) \"\.\" \"subscribetest1\.subfolder1\" +} +S: a06 OK LSUB completed. + +# LIST A subset of subscribed +C: a07 LSUB "" "subscribetest.sub*" +S: \* LSUB \(\) \"\.\" \"subscribetest\.subfolder\" +S: a07 OK LSUB completed. + +# Unsubscribe from a parent mailbox, make sure that subscribetest.subfolder is still subscribed. +C: a08 UNSUBSCRIBE subscribetest +S: a08 OK UNSUBSCRIBE completed. + +C: a09 LSUB "" "sub*" +S: \* LSUB \(\) \"\.\" \"subscribetest\.subfolder\" +S: \* LSUB \(\) \"\.\" \"subscribetest1\.subfolder1\" +S: a09 OK LSUB completed. + +C: b01 LSUB "" "%" +S: \* LSUB \(\\Noselect\) \"\.\" \"subscribetest\" +S: \* LSUB \(\\Noselect\) \"\.\" \"subscribetest1\" +S: b01 OK LSUB completed. + + +# Attempt to unsubscribe from a mailbox that isn't subscribed +C: a10 UNSUBSCRIBE subscribetest1 +S: a10 OK UNSUBSCRIBE completed. + +C: a11 UNSUBSCRIBE subscribetest.subfolder +S: a11 OK UNSUBSCRIBE completed. + +# LIST All subscribed +C: a12 LSUB "" "*" +S: \* LSUB \(\) \"\.\" \"subscribetest1\.subfolder1\" +S: a12 OK LSUB completed. + +# Cleanup +C: a13 UNSUBSCRIBE subscribetest1.subfolder1 +S: a13 OK UNSUBSCRIBE completed. + +C: a14 DELETE subscribetest1.subfolder1 +S: a14 OK DELETE completed. +C: a15 DELETE subscribetest1 +S: a15 OK DELETE completed. +C: a16 DELETE subscribetest.subfolder +S: a16 OK DELETE completed. +C: a17 DELETE subscribetest +S: a17 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/TextPartialFetch.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/TextPartialFetch.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/TextPartialFetch.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/TextPartialFetch.test Fri May 29 05:16:50 2015 @@ -0,0 +1,515 @@ +################################################################ +# 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: 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 \d+\].* +S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\].* +S: \* OK \[HIGHESTMODSEQ \d+\].* +S: \* OK \[UIDNEXT 1\].* +S: A3 OK \[READ-WRITE\] SELECT completed\. +C: A4 APPEND testmailbox {1767+} +C: From: Timothy Tayler <timo...@example.org> +C: To: Samual Smith <sam...@example.org> +C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT) +C: Subject: A Multipart Email +C: Content-Type: multipart/mixed;boundary=1729 +C: +C: Start with a preamble +C: +C: --1729 +C: Content-Type: text/plain; charset=US-ASCII +C: +C: Rhubarb! +C: +C: --1729 +C: Content-Type: application/octet-stream +C: Content-Transfer-Encoding: base64 +C: +C: 987654321AHPLA +C: +C: --1729 +C: Content-Type: message/rfc822 +C: +C: From: Timothy Tayler <timo...@example.org> +C: To: Samual Smith <sam...@example.org> +C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT) +C: Subject: A Multipart Alternative Email +C: Content-Type: multipart/alternative;boundary=42 +C: +C: This message has a premable +C: +C: --42 +C: Content-Type: text/plain; charset=US-ASCII +C: +C: Custard! +C: +C: --42 +C: Content-Type: application/octet-stream +C: +C: CUSTARDCUSTARDCUSTARD +C: +C: --42-- +C: +C: --1729 +C: Content-Type: multipart/mixed; boundary=4.66920160910299 +C: +C: --4.66920160910299 +C: Content-Type: image/gif +C: Content-Transfer-Encoding: base64 +C: MIME-Version: 1.0 +C: Content-ID: 238478934723847238947892374 +C: Content-Description: Bogus Image Data +C: +C: ABCDFEGHIJKLMNO +C: +C: --4.66920160910299 +C: Content-Type: message/rfc822 +C: +C: From: Timothy Tayler <timo...@example.org> +C: To: John Smith <j...@example.org> +C: Date: Sat, 16 Feb 2008 12:00:00 +0000 (GMT) +C: Subject: Another Example Email +C: Content-Type: multipart/mixed;boundary=2.50290787509 +C: +C: Yet another preamble +C: +C: --2.50290787509 +C: Content-Type: text/plain +C: +C: Rhubard AND Custard! +C: +C: --2.50290787509 +C: Content-Type: multipart/alternative;boundary=3.243F6A8885A308D3 +C: +C: --3.243F6A8885A308D3 +C: Content-Type: text/plain +C: +C: Rhubard?Custard? +C: +C: --3.243F6A8885A308D3 +C: +C: Content-Type: text/richtext +C: +C: Rhubard?Custard? +C: +C: --3.243F6A8885A308D3-- +C: +C: --2.50290787509-- +C: +C: --4.66920160910299-- +C: --1729-- +C: +S: \* 1 EXISTS +S: \* 1 RECENT +S: A4 OK (\[.+\] )?APPEND completed\. +C: A5 SELECT testmailbox +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: A5 OK \[READ-WRITE\] SELECT completed\. +C: A6 FETCH 1 (BODY[TEXT]<0.0>) +S: A6 BAD FETCH failed. Illegal arguments. +C: A7 FETCH 1 (BODY[TEXT]<0.16>) +S: \* 1 FETCH \(FLAGS \(\\Recent \\Seen\) BODY\[TEXT\]<0> \{16\} +S: Start with a pre\) +S: A7 OK FETCH completed\. +C: A8 FETCH 1 (BODY[TEXT]<0.32>) +S: \* 1 FETCH \(BODY\[TEXT\]<0> \{32\} +S: Start with a preamble +S: +S: --1729\r\) +S: A8 OK FETCH completed\. +C: A9 FETCH 1 (BODY[TEXT]<0.64>) +S: \* 1 FETCH \(BODY\[TEXT\]<0> \{64\} +S: Start with a preamble +S: +S: --1729 +S: Content-Type: text/plain; chars\) +S: A9 OK FETCH completed\. +C: A10 FETCH 1 (BODY[TEXT]<0.128>) +S: \* 1 FETCH \(BODY\[TEXT\]<0> \{128\} +S: Start with a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/oct\) +S: A10 OK FETCH completed\. +C: A11 FETCH 1 (BODY[TEXT]<0.1024>) +S: \* 1 FETCH \(BODY\[TEXT\]<0> \{1024\} +S: Start with a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/octet-stream +S: Content-Transfer-Encoding: base64 +S: +S: 987654321AHPLA +S: +S: --1729 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: Samual Smith <samual@example\.org> +S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: A Multipart Alternative Email +S: Content-Type: multipart/alternative;boundary=42 +S: +S: This message has a premable +S: +S: --42 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Custard! +S: +S: --42 +S: Content-Type: application/octet-stream +S: +S: CUSTARDCUSTARDCUSTARD +S: +S: --42-- +S: +S: --1729 +S: Content-Type: multipart/mixed; boundary=4\.66920160910299 +S: +S: --4\.66920160910299 +S: Content-Type: image/gif +S: Content-Transfer-Encoding: base64 +S: MIME-Version: 1\.0 +S: Content-ID: 238478934723847238947892374 +S: Content-Description: Bogus Image Data +S: +S: ABCDFEGHIJKLMNO +S: +S: --4\.66920160910299 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: John Smith <john@example\.\) +S: A11 OK FETCH completed\. +C: A12 FETCH 1 (BODY[TEXT]<0.2048>) +S: \* 1 FETCH \(BODY\[TEXT\]<0> \{1564\} +S: Start with a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/octet-stream +S: Content-Transfer-Encoding: base64 +S: +S: 987654321AHPLA +S: +S: --1729 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: Samual Smith <samual@example\.org> +S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: A Multipart Alternative Email +S: Content-Type: multipart/alternative;boundary=42 +S: +S: This message has a premable +S: +S: --42 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Custard! +S: +S: --42 +S: Content-Type: application/octet-stream +S: +S: CUSTARDCUSTARDCUSTARD +S: +S: --42-- +S: +S: --1729 +S: Content-Type: multipart/mixed; boundary=4\.66920160910299 +S: +S: --4\.66920160910299 +S: Content-Type: image/gif +S: Content-Transfer-Encoding: base64 +S: MIME-Version: 1\.0 +S: Content-ID: 238478934723847238947892374 +S: Content-Description: Bogus Image Data +S: +S: ABCDFEGHIJKLMNO +S: +S: --4\.66920160910299 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: John Smith <john@example\.org> +S: Date: Sat, 16 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: Another Example Email +S: Content-Type: multipart/mixed;boundary=2\.50290787509 +S: +S: Yet another preamble +S: +S: --2\.50290787509 +S: Content-Type: text/plain +S: +S: Rhubard AND Custard! +S: +S: --2\.50290787509 +S: Content-Type: multipart/alternative;boundary=3\.243F6A8885A308D3 +S: +S: --3\.243F6A8885A308D3 +S: Content-Type: text/plain +S: +S: Rhubard\?Custard\? +S: +S: --3\.243F6A8885A308D3 +S: +S: Content-Type: text/richtext +S: +S: Rhubard\?Custard\? +S: +S: --3\.243F6A8885A308D3-- +S: +S: --2\.50290787509-- +S: +S: --4\.66920160910299-- +S: --1729-- +S: \) +S: A12 OK FETCH completed\. +C: A13 FETCH 1 (BODY[TEXT]<7.0>) +S: A13 BAD FETCH failed. Illegal arguments. +C: A14 FETCH 1 (BODY[TEXT]<7.16>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{16\} +S: ith a preamble +S: \) +S: A14 OK FETCH completed\. +C: A15 FETCH 1 (BODY[TEXT]<7.32>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{32\} +S: ith a preamble +S: +S: --1729 +S: Conten\) +S: A15 OK FETCH completed\. +C: A16 FETCH 1 (BODY[TEXT]<7.64>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{64\} +S: ith a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-A\) +S: A16 OK FETCH completed\. +C: A17 FETCH 1 (BODY[TEXT]<7.128>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{128\} +S: ith a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/octet-stre\) +S: A17 OK FETCH completed\. +C: A18 FETCH 1 (BODY[TEXT]<7.1024>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{1024\} +S: ith a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/octet-stream +S: Content-Transfer-Encoding: base64 +S: +S: 987654321AHPLA +S: +S: --1729 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: Samual Smith <samual@example\.org> +S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: A Multipart Alternative Email +S: Content-Type: multipart/alternative;boundary=42 +S: +S: This message has a premable +S: +S: --42 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Custard! +S: +S: --42 +S: Content-Type: application/octet-stream +S: +S: CUSTARDCUSTARDCUSTARD +S: +S: --42-- +S: +S: --1729 +S: Content-Type: multipart/mixed; boundary=4\.66920160910299 +S: +S: --4\.66920160910299 +S: Content-Type: image/gif +S: Content-Transfer-Encoding: base64 +S: MIME-Version: 1\.0 +S: Content-ID: 238478934723847238947892374 +S: Content-Description: Bogus Image Data +S: +S: ABCDFEGHIJKLMNO +S: +S: --4\.66920160910299 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: John Smith <john@example\.org> +S: D\) +S: A18 OK FETCH completed\. +C: A19 FETCH 1 (BODY[TEXT]<7.2048>) +S: \* 1 FETCH \(BODY\[TEXT\]<7> \{1557\} +S: ith a preamble +S: +S: --1729 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Rhubarb! +S: +S: --1729 +S: Content-Type: application/octet-stream +S: Content-Transfer-Encoding: base64 +S: +S: 987654321AHPLA +S: +S: --1729 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: Samual Smith <samual@example\.org> +S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: A Multipart Alternative Email +S: Content-Type: multipart/alternative;boundary=42 +S: +S: This message has a premable +S: +S: --42 +S: Content-Type: text/plain; charset=US-ASCII +S: +S: Custard! +S: +S: --42 +S: Content-Type: application/octet-stream +S: +S: CUSTARDCUSTARDCUSTARD +S: +S: --42-- +S: +S: --1729 +S: Content-Type: multipart/mixed; boundary=4\.66920160910299 +S: +S: --4\.66920160910299 +S: Content-Type: image/gif +S: Content-Transfer-Encoding: base64 +S: MIME-Version: 1\.0 +S: Content-ID: 238478934723847238947892374 +S: Content-Description: Bogus Image Data +S: +S: ABCDFEGHIJKLMNO +S: +S: --4\.66920160910299 +S: Content-Type: message/rfc822 +S: +S: From: Timothy Tayler <timothy@example\.org> +S: To: John Smith <john@example\.org> +S: Date: Sat, 16 Feb 2008 12:00:00 \+0000 \(GMT\) +S: Subject: Another Example Email +S: Content-Type: multipart/mixed;boundary=2\.50290787509 +S: +S: Yet another preamble +S: +S: --2\.50290787509 +S: Content-Type: text/plain +S: +S: Rhubard AND Custard! +S: +S: --2\.50290787509 +S: Content-Type: multipart/alternative;boundary=3\.243F6A8885A308D3 +S: +S: --3\.243F6A8885A308D3 +S: Content-Type: text/plain +S: +S: Rhubard\?Custard\? +S: +S: --3\.243F6A8885A308D3 +S: +S: Content-Type: text/richtext +S: +S: Rhubard\?Custard\? +S: +S: --3\.243F6A8885A308D3-- +S: +S: --2\.50290787509-- +S: +S: --4\.66920160910299-- +S: --1729-- +S: \) +S: A19 OK FETCH completed\. +C: A20 FETCH 1 (BODY[TEXT]<10000.0>) +S: A20 BAD FETCH failed. Illegal arguments. +C: A21 FETCH 1 (BODY[TEXT]<10000.16>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A21 OK FETCH completed\. +C: A22 FETCH 1 (BODY[TEXT]<10000.32>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A22 OK FETCH completed\. +C: A23 FETCH 1 (BODY[TEXT]<10000.64>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A23 OK FETCH completed\. +C: A24 FETCH 1 (BODY[TEXT]<10000.128>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A24 OK FETCH completed\. +C: A25 FETCH 1 (BODY[TEXT]<10000.1024>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A25 OK FETCH completed\. +C: A26 FETCH 1 (BODY[TEXT]<10000.2048>) +S: \* 1 FETCH \(BODY\[TEXT\]<10000> \{0\} +S: \) +S: A26 OK FETCH completed\. +C: A27 DELETE testmailbox +S: A27 OK DELETE completed\. Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Uid.test URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Uid.test?rev=1682367&view=auto ============================================================================== --- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Uid.test (added) +++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/Uid.test Fri May 29 05:16:50 2015 @@ -0,0 +1,82 @@ +################################################################ +# 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. # +################################################################ +#Delete the first message, so that UIDs don't match MSNs +C: a STORE 1 +FLAGS (\Deleted) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\) +S: a OK STORE completed. +C: a EXPUNGE +S: \* 1 EXPUNGE +S: \* 3 RECENT +S: a OK EXPUNGE completed. + +#Regular fetch +C: a FETCH 1:3 (UID) +S: \* 1 FETCH \(UID 2\) +S: \* 2 FETCH \(UID 3\) +S: \* 3 FETCH \(UID 4\) +S: a OK FETCH completed. + +#UID fetch +C: a UID FETCH 2:3 (INTERNALDATE) +S: \* 1 FETCH \(INTERNALDATE "[^"]*" UID 2\) +S: \* 2 FETCH \(INTERNALDATE ".*" UID 3\) +S: a OK FETCH completed. + +#UID store +C: a1 UID STORE 2:3 +FLAGS (\Deleted) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 2\) +S: \* 2 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 3\) +S: a1 OK STORE completed. + +# invalid messageset +C: a2 FETCH 1:100 (FLAGS UID) +S: a2 BAD FETCH failed. Invalid messageset. + +# Regular fetch +C: a2 FETCH 1:3 (FLAGS UID) +S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 2\) +S: \* 2 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 3\) +S: \* 3 FETCH \(FLAGS \(\\Recent\) UID 4\) +S: a2 OK FETCH completed. + +# CREATE and do a UID COPY +C: a3 CREATE copied +S: a3 OK CREATE completed. + +C: a4 UID COPY 2 copied +S: a4 OK (\[.+\] )?COPY completed. + +C: a STATUS copied (MESSAGES) +S: \* STATUS "copied" \(MESSAGES 1\) +S: a OK STATUS completed. + +C: A003 STORE 1:3 +FLAGS.SILENT (\FLAGGED) +S: A003 OK STORE completed. + +# Do a UID SEARCH +C: a UID SEARCH FLAGGED +S: \* SEARCH 2 3 4 +S: a OK SEARCH completed. + +# Cleanup +C: a1 DELETE copied +S: a1 OK DELETE completed. + + + --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org