Author: rdonkin
Date: Sun Jun 29 10:18:27 2008
New Revision: 672645
URL: http://svn.apache.org/viewvc?rev=672645&view=rev
Log:
Test script for one part bodystructure
Added:
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/mime-plain-text.mail
Modified:
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
Modified:
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java?rev=672645&r1=672644&r2=672645&view=diff
==============================================================================
---
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
(original)
+++
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
Sun Jun 29 10:18:27 2008
@@ -35,10 +35,46 @@
public static final void main(String[] args) throws Exception {
ScriptBuilder builder = ScriptBuilder.open("localhost", 143);
- bodyStructure(builder);
+ bodyStructureSimple(builder);
}
- public static void bodyStructure(ScriptBuilder builder) throws Exception {
+ public static void bodyStructureSimple(ScriptBuilder builder) throws
Exception {
+ builder.login();
+ builder.create();
+ builder.select();
+ builder.setFile("rfc822-multiple-addresses.mail");
+ builder.append();
+ builder.setFile("wild-example.mail");
+ builder.append();
+ builder.setFile("mime-plain-text.mail");
+ builder.append();
+ builder.fetchAllMessages();
+ builder.fetchSection("");
+ builder.fetchSection("TEXT");
+ builder.fetchSection("HEADER");
+ builder.fetchSection("1");
+ builder.fetchSection("2");
+ builder.fetchSection("3");
+ builder.fetchSection("3.HEADER");
+ builder.fetchSection("3.TEXT");
+ builder.fetchSection("3.1");
+ builder.fetchSection("3.2");
+ builder.fetchSection("4");
+ builder.fetchSection("4.1");
+ builder.fetchSection("4.1.MIME");
+ builder.fetchSection("4.2");
+ builder.fetchSection("4.2.HEADER");
+ builder.fetchSection("4.2.TEXT");
+ builder.fetchSection("4.2.1");
+ builder.fetchSection("4.2.2");
+ builder.fetchSection("4.2.2.1");
+ builder.fetchSection("4.2.2.2");
+ builder.resetFetch().setBodyFetch(true).setBodyStructureFetch(true);
+ builder.fetchAllMessages();
+ builder.quit();
+ }
+
+ public static void bodyStructureMultipart(ScriptBuilder builder) throws
Exception {
builder.login();
builder.create();
builder.select();
Added:
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
URL:
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test?rev=672645&view=auto
==============================================================================
---
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
(added)
+++
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
Sun Jun 29 10:18:27 2008
@@ -0,0 +1,177 @@
+################################################################
+# 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: A3 OK \[READ-WRITE\] SELECT completed\.
+C: A4 APPEND testmailbox {318+}
+C: From: "Brian G. Hutton" <[EMAIL PROTECTED]>
+C: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh? <[EMAIL
PROTECTED]>
+C: CC: <[EMAIL PROTECTED]>, "David \"The Thin White Duke\" Bowie" <[EMAIL
PROTECTED]>
+C: Subject: Rhubarb
+C: Date: Sat, 23 Feb 2008 07:48:03 -0600
+C: Message-ID: <[EMAIL PROTECTED]>
+C:
+C: Rhubarb!
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A4 OK APPEND completed\.
+C: A5 APPEND testmailbox {704+}
+C: Received: by 10.114.81.13 with HTTP; Sat, 2 Feb 2008 05:14:19 -0800 (PST)
+C: Message-ID: <[EMAIL PROTECTED]>
+C: Date: Sat, 2 Feb 2008 13:14:19 +0000
+C: From: "Robert Burrell Donkin" <[EMAIL PROTECTED]>
+C: To: "James Developers List" <[email protected]>
+C: Subject: JCR -> trunk ...?
+C: MIME-Version: 1.0
+C: Content-Type: text/plain; charset=ISO-8859-1
+C: Content-Transfer-Encoding: 7bit
+C: Content-Disposition: inline
+C: Delivered-To: [EMAIL PROTECTED]
+C:
+C: i'd like to copy james-jcr into trunk and add some example
+C: configurations. development can continue in the sandbox (or not) and
+C: merged in later (if necessary).
+C:
+C: any objections?
+C:
+C: - robert
+S: \* 2 EXISTS
+S: \* 2 RECENT
+S: A5 OK APPEND completed\.
+C: A6 APPEND testmailbox {786+}
+C: From: Samual Smith <[EMAIL PROTECTED]>
+C: To: John Smith <[EMAIL PROTECTED]>
+C: Reply-To: "Timothy Taylor: Email" <[EMAIL PROTECTED]>
+C: Subject: Re: Custard!
+C: Date: Sat, 23 Feb 2008 18:15:18 +0000
+C: Message-ID: <[EMAIL PROTECTED]>
+C: In-Reply-To: <[EMAIL PROTECTED]>
+C: References: <[EMAIL PROTECTED]>
+C: Mime-Version: 1.0
+C: Content-Transfer-Encoding: 7bit
+C: Content-Disposition: inline; foo=bar; one=1; param=value;
+C: Content-Language: en, en-US, en-CA
+C: Content-ID: <[EMAIL PROTECTED]>
+C: Content-Description: Homage to 70's TV
+C: Content-Type: application/xhtml+xml
+C: Content-Location: http://www.example.org/rhubard.html
+C:
+C: <!DOCTYPE html
+C: PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN
+C: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
+C: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+S: \* 3 EXISTS
+S: \* 3 RECENT
+S: A6 OK APPEND completed\.
+C: A7 FETCH 1:* ()
+S: \* 1 FETCH \(\)
+S: \* 2 FETCH \(\)
+S: \* 3 FETCH \(\)
+S: A7 OK FETCH completed\.
+C: A8 FETCH 1 (BODY[])
+S: \* 1 FETCH \(FLAGS \(\\Recent \\Seen\) BODY\[\] \{318\}
+S: From: "Brian G\. Hutton" <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh\? <[EMAIL
PROTECTED]>
+S: CC: <[EMAIL PROTECTED]>, "David \\"The Thin White Duke\\" Bowie" <[EMAIL
PROTECTED]>
+S: Subject: Rhubarb
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S:
+S: Rhubarb!\)
+S: A8 OK FETCH completed\.
+C: A9 FETCH 1 (BODY[TEXT])
+S: \* 1 FETCH \(BODY\[TEXT\] \{8\}
+S: Rhubarb!\)
+S: A9 OK FETCH completed\.
+C: A10 FETCH 1 (BODY[HEADER])
+S: \* 1 FETCH \(BODY\[HEADER\] \{310\}
+S: From: "Brian G\. Hutton" <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh\? <[EMAIL
PROTECTED]>
+S: CC: <[EMAIL PROTECTED]>, "David \\"The Thin White Duke\\" Bowie" <[EMAIL
PROTECTED]>
+S: Subject: Rhubarb
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S:
+S: \)
+S: A10 OK FETCH completed\.
+C: A11 FETCH 1 (BODY[1])
+S: \* 1 FETCH \(BODY\[1\] \{8\}
+S: Rhubarb!\)
+S: A11 OK FETCH completed\.
+C: A12 FETCH 1 (BODY[2])
+S: \* 1 FETCH \(BODY\[2\] NIL\)
+S: A12 OK FETCH completed\.
+C: A13 FETCH 1 (BODY[3])
+S: \* 1 FETCH \(BODY\[3\] NIL\)
+S: A13 OK FETCH completed\.
+C: A14 FETCH 1 (BODY[3.HEADER])
+S: \* 1 FETCH \(BODY\[3\.HEADER\] NIL\)
+S: A14 OK FETCH completed\.
+C: A15 FETCH 1 (BODY[3.TEXT])
+S: \* 1 FETCH \(BODY\[3\.TEXT\] NIL\)
+S: A15 OK FETCH completed\.
+C: A16 FETCH 1 (BODY[3.1])
+S: \* 1 FETCH \(BODY\[3\.1\] NIL\)
+S: A16 OK FETCH completed\.
+C: A17 FETCH 1 (BODY[3.2])
+S: \* 1 FETCH \(BODY\[3\.2\] NIL\)
+S: A17 OK FETCH completed\.
+C: A18 FETCH 1 (BODY[4])
+S: \* 1 FETCH \(BODY\[4\] NIL\)
+S: A18 OK FETCH completed\.
+C: A19 FETCH 1 (BODY[4.1])
+S: \* 1 FETCH \(BODY\[4\.1\] NIL\)
+S: A19 OK FETCH completed\.
+C: A20 FETCH 1 (BODY[4.1.MIME])
+S: \* 1 FETCH \(BODY\[4\.1\.MIME\] NIL\)
+S: A20 OK FETCH completed\.
+C: A21 FETCH 1 (BODY[4.2])
+S: \* 1 FETCH \(BODY\[4\.2\] NIL\)
+S: A21 OK FETCH completed\.
+C: A22 FETCH 1 (BODY[4.2.HEADER])
+S: \* 1 FETCH \(BODY\[4\.2\.HEADER\] NIL\)
+S: A22 OK FETCH completed\.
+C: A23 FETCH 1 (BODY[4.2.TEXT])
+S: \* 1 FETCH \(BODY\[4\.2\.TEXT\] NIL\)
+S: A23 OK FETCH completed\.
+C: A24 FETCH 1 (BODY[4.2.1])
+S: \* 1 FETCH \(BODY\[4\.2\.1\] NIL\)
+S: A24 OK FETCH completed\.
+C: A25 FETCH 1 (BODY[4.2.2])
+S: \* 1 FETCH \(BODY\[4\.2\.2\] NIL\)
+S: A25 OK FETCH completed\.
+C: A26 FETCH 1 (BODY[4.2.2.1])
+S: \* 1 FETCH \(BODY\[4\.2\.2\.1\] NIL\)
+S: A26 OK FETCH completed\.
+C: A27 FETCH 1 (BODY[4.2.2.2])
+S: \* 1 FETCH \(BODY\[4\.2\.2\.2\] NIL\)
+S: A27 OK FETCH completed\.
+C: A28 FETCH 1:* (BODY BODYSTRUCTURE)
+S: \* 1 FETCH \(BODY \("text" "plain" \("charset" "us-ascii"\) NIL NIL "7bit"
8 0\) BODYSTRUCTURE \("text" "plain" \("charset" "us-ascii"\) NIL NIL "7bit" 8
0 NIL NIL NIL\)\)
+S: \* 2 FETCH \(BODY \("text" "plain" \("charset" "ISO-8859-1"\) NIL NIL
"7bit" 192 6\) BODYSTRUCTURE \("text" "plain" \("charset" "ISO-8859-1"\) NIL
NIL "7bit" 192 6 NIL \("inline" NIL\) NIL\)\)
+S: \* 3 FETCH \(BODY \("application" "xhtml\+xml" NIL "<[EMAIL PROTECTED]>"
"Homage to 70's TV" "7bit" 183\) BODYSTRUCTURE \("application" "xhtml\+xml" NIL
"<[EMAIL PROTECTED]>" "Homage to 70's TV" "7bit" 183 NIL \("inline" \("foo"
"bar" "one" "1" "param" "value"\)\) \("en" "en-US" "en-CA"\)\)\)
+S: A28 OK FETCH completed\.
+C: A29 DELETE testmailbox
+S: A29 OK DELETE completed\.
Added:
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/mime-plain-text.mail
URL:
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/mime-plain-text.mail?rev=672645&view=auto
==============================================================================
---
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/mime-plain-text.mail
(added)
+++
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/mime-plain-text.mail
Sun Jun 29 10:18:27 2008
@@ -0,0 +1,40 @@
+################################################################
+# 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: Samual Smith <[EMAIL PROTECTED]>
+To: John Smith <[EMAIL PROTECTED]>
+Reply-To: "Timothy Taylor: Email" <[EMAIL PROTECTED]>
+Subject: Re: Custard!
+Date: Sat, 23 Feb 2008 18:15:18 +0000
+Message-ID: <[EMAIL PROTECTED]>
+In-Reply-To: <[EMAIL PROTECTED]>
+References: <[EMAIL PROTECTED]>
+Mime-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline; foo=bar; one=1; param=value;
+Content-Language: en, en-US, en-CA
+Content-ID: <[EMAIL PROTECTED]>
+Content-Description: Homage to 70's TV
+Content-Type: application/xhtml+xml
+Content-Location: http://www.example.org/rhubard.html
+
+<!DOCTYPE html
+PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
+<html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]