geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r421852 [15/15] - in /geronimo/specs/trunk: ./ geronimo-spec-j2ee/ geronimo-spec-javamail-1.3.1/ geronimo-spec-javamail-1.3.1/src/ geronimo-spec-javamail-1.4/ geronimo-spec-javamail-1.4/src/ geronimo-spec-javamail-1.4/src/main/ geronimo-spe...
Date Fri, 14 Jul 2006 10:02:29 GMT
Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/MimeUtilityTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/MimeUtilityTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/MimeUtilityTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,41 @@
+/**
+ *
+ * Copyright 2003-2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.internet;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class NewsAddressTest extends TestCase {
+    public void testNewsAddress() throws AddressException {
+        NewsAddress na = new NewsAddress("geronimo-dev", "news.apache.org");
+        assertEquals("geronimo-dev", na.getNewsgroup());
+        assertEquals("news.apache.org", na.getHost());
+        assertEquals("news", na.getType());
+        assertEquals("geronimo-dev", na.toString());
+        NewsAddress[] nas =
+            NewsAddress.parse(
+                "geronimo-dev@news.apache.org, geronimo-user@news.apache.org");
+        assertEquals(2, nas.length);
+        assertEquals("geronimo-dev", nas[0].getNewsgroup());
+        assertEquals("news.apache.org", nas[0].getHost());
+        assertEquals("geronimo-user", nas[1].getNewsgroup());
+        assertEquals("news.apache.org", nas[1].getHost());
+    }
+}

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/NewsAddressTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,63 @@
+/**
+ *
+ * Copyright 2003-2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.internet;
+import junit.framework.TestCase;
+/**
+ * @version $Rev$ $Date$
+ */
+public class ParameterListTest extends TestCase {
+    public ParameterListTest(String arg0) {
+        super(arg0);
+    }
+    public void testParameters() throws ParseException {
+        ParameterList list =
+            new ParameterList(";thing=value;thong=vulue;thung=git");
+        assertEquals("value", list.get("thing"));
+        assertEquals("vulue", list.get("thong"));
+        assertEquals("git", list.get("thung"));
+    }
+
+    public void testQuotedParameter() throws ParseException {
+        ParameterList list = new ParameterList(";foo=one;bar=\"two\"");
+        assertEquals("one", list.get("foo"));
+        assertEquals("two", list.get("bar"));
+    }
+
+    public void testEncodeDecode() throws Exception {
+
+        System.setProperty("mail.mime.encodeparameters", "true");
+        System.setProperty("mail.mime.decodeparameters", "true");
+
+        String value = " '*% abc \u0081\u0082\r\n\t";
+        String encodedTest = "; one*=UTF-8''%20%27%2A%25%20abc%20%C2%81%C2%82%0D%0A%09";
+
+        ParameterList list = new ParameterList();
+        list.set("one", value, "UTF-8");
+
+        assertEquals(value, list.get("one"));
+
+        String encoded = list.toString();
+
+        assertEquals(encoded, encodedTest);
+
+        ParameterList list2 = new ParameterList(encoded);
+        assertEquals(value, list.get("one"));
+        assertEquals(list2.toString(), encodedTest);
+    }
+
+}

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/ParameterListTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.internet;
+
+import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.mail.MessagingException;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PreencodedMimeBodyPartTest extends TestCase {
+
+     public void testEncoding() throws Exception {
+         PreencodedMimeBodyPart part = new PreencodedMimeBodyPart("base64");
+         assertEquals("base64", part.getEncoding());
+     }
+
+     public void testUpdateHeaders() throws Exception {
+         TestBodyPart part = new TestBodyPart("base64");
+
+         part.updateHeaders();
+
+         assertEquals("base64", part.getHeader("Content-Transfer-Encoding", null));
+     }
+
+     public void testWriteTo() throws Exception {
+         PreencodedMimeBodyPart part = new PreencodedMimeBodyPart("binary");
+
+         byte[] content = new byte[] { 81, 82, 83, 84, 85, 86 };
+
+         part.setContent(new String(content, "UTF-8"), "text/plain; charset=\"UTF-8\"");
+
+         ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+         part.writeTo(out);
+
+         byte[] data = out.toByteArray();
+
+         // we need to scan forward to the actual content and verify it has been written
without additional
+         // encoding.  Our marker is a "crlfcrlf" sequence.
+
+
+         for (int i = 0; i < data.length; i++) {
+             if (data[i] == '\r') {
+                 if (data[i + 1] == '\n' && data[i + 2] == '\r' && data[i
+ 3] == '\n') {
+                     for (int j = 0; j < content.length; j++) {
+                         assertEquals(data[i + 4 + j], content[j]);
+                     }
+
+                 }
+             }
+         }
+     }
+
+
+     public class TestBodyPart extends PreencodedMimeBodyPart {
+
+         public TestBodyPart(String encoding) {
+             super(encoding);
+         }
+
+         public void updateHeaders() throws MessagingException {
+             super.updateHeaders();
+         }
+     }
+}
+
+

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,66 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.util;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+/**
+ * @version $Rev$ $Date$
+ */
+public class ByteArrayDataSourceTest extends TestCase {
+    public ByteArrayDataSourceTest(String arg0) {
+        super(arg0);
+    }
+
+    public void testByteArray() throws Exception {
+        doDataSourceTest(new ByteArrayDataSource("0123456789", "text/plain"), "text/plain");
+        doDataSourceTest(new ByteArrayDataSource("0123456789".getBytes(), "text/xml"), "text/xml");
+        ByteArrayInputStream in = new ByteArrayInputStream("0123456789".getBytes());
+
+        doDataSourceTest(new ByteArrayDataSource(in, "text/html"), "text/html");
+
+        try {
+            ByteArrayDataSource source = new ByteArrayDataSource("01234567890", "text/plain");
+            source.getOutputStream();
+            fail();
+        } catch (IOException e) {
+        }
+
+        ByteArrayDataSource source = new ByteArrayDataSource("01234567890", "text/plain");
+        assertEquals(source.getName(), "");
+
+        source.setName("fred");
+        assertEquals(source.getName(), "fred");
+    }
+
+
+    private void doDataSourceTest(ByteArrayDataSource source, String type) throws Exception
{
+        assertEquals(type, source.getContentType());
+
+        InputStream in = source.getInputStream();
+        byte[] bytes = new byte[10];
+
+        int count = in.read(bytes);
+
+        assertEquals(count, bytes.length);
+        assertEquals("0123456789", new String(bytes));
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,90 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.util;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.mail.internet.SharedInputStream;
+
+import junit.framework.TestCase;
+/**
+ * @version $Rev$ $Date$
+ */
+public class SharedByteArrayInputStreamTest extends TestCase {
+    private String testString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+    private byte[] testData = testString.getBytes();
+
+
+
+    public SharedByteArrayInputStreamTest(String arg0) {
+        super(arg0);
+    }
+
+    public void testInput() throws Exception {
+        SharedByteArrayInputStream in = new SharedByteArrayInputStream(testData);
+
+        assertEquals(in.read(), '0');
+
+        assertEquals(in.getPosition(), 1);
+
+        byte[] bytes = new byte[10];
+
+        assertEquals(in.read(bytes), 10);
+        assertEquals(new String(bytes), "123456789a");
+        assertEquals(in.getPosition(), 11);
+
+        assertEquals(in.read(bytes, 5, 5), 5);
+        assertEquals(new String(bytes), "12345bcdef");
+        assertEquals(in.getPosition(), 16);
+
+        assertEquals(in.skip(5), 5);
+        assertEquals(in.getPosition(), 21);
+        assertEquals(in.read(), 'l');
+
+        while (in.read() != 'Z') {
+        }
+
+        assertEquals(in.read(), -1);
+    }
+
+
+    public void testNewStream() throws Exception {
+        SharedByteArrayInputStream in = new SharedByteArrayInputStream(testData);
+
+        SharedByteArrayInputStream sub = (SharedByteArrayInputStream)in.newStream(10, 10
+ 26);
+
+        assertEquals(sub.getPosition(), 0);
+
+        assertEquals(in.read(), '0');
+        assertEquals(sub.read(), 'a');
+
+        sub.skip(1);
+        assertEquals(sub.getPosition(), 2);
+
+        while (sub.read() != 'z') {
+        }
+
+        assertEquals(sub.read(), -1);
+
+        SharedByteArrayInputStream sub2 = (SharedByteArrayInputStream)sub.newStream(5, 10);
+
+        assertEquals(sub2.getPosition(), 0);
+        assertEquals(sub2.read(), 'f');
+    }
+}

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
(added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
Fri Jul 14 03:02:19 2006
@@ -0,0 +1,150 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+package javax.mail.util;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.mail.internet.SharedInputStream;
+
+import junit.framework.TestCase;
+/**
+ * @version $Rev$ $Date$
+ */
+public class SharedFileInputStreamTest extends TestCase {
+
+    File basedir = new File(System.getProperty("basedir", "."));
+    File testInput = new File(basedir, "src/test/resources/test.dat");
+
+    public SharedFileInputStreamTest(String arg0) {
+        super(arg0);
+    }
+
+    public void testInput() throws Exception {
+        doTestInput(new SharedFileInputStream(testInput));
+        doTestInput(new SharedFileInputStream(testInput.getPath()));
+
+        doTestInput(new SharedFileInputStream(testInput, 16));
+        doTestInput(new SharedFileInputStream(testInput.getPath(), 16));
+    }
+
+
+    public void doTestInput(SharedFileInputStream in) throws Exception {
+        assertEquals(in.read(), '0');
+
+        assertEquals(in.getPosition(), 1);
+
+        byte[] bytes = new byte[10];
+
+        assertEquals(in.read(bytes), 10);
+        assertEquals(new String(bytes), "123456789a");
+        assertEquals(in.getPosition(), 11);
+
+        assertEquals(in.read(bytes, 5, 5), 5);
+        assertEquals(new String(bytes), "12345bcdef");
+        assertEquals(in.getPosition(), 16);
+
+        assertEquals(in.skip(5), 5);
+        assertEquals(in.getPosition(), 21);
+        assertEquals(in.read(), 'l');
+
+        while (in.read() != '\n' ) {
+        }
+
+        assertEquals(in.read(), -1);
+
+        in.close();
+    }
+
+
+    public void testNewStream() throws Exception {
+        SharedFileInputStream in = new SharedFileInputStream(testInput);
+
+        SharedFileInputStream sub = (SharedFileInputStream)in.newStream(10, 10 + 26);
+
+        assertEquals(sub.getPosition(), 0);
+
+        assertEquals(in.read(), '0');
+        assertEquals(sub.read(), 'a');
+
+        sub.skip(1);
+        assertEquals(sub.getPosition(), 2);
+
+        while (sub.read() != 'z') {
+        }
+
+        assertEquals(sub.read(), -1);
+
+        SharedFileInputStream sub2 = (SharedFileInputStream)sub.newStream(5, 10);
+
+        sub.close();    // should not close in or sub2
+
+        assertEquals(sub2.getPosition(), 0);
+        assertEquals(sub2.read(), 'f');
+
+        assertEquals(in.read(), '1');   // should still work
+
+        sub2.close();
+
+        assertEquals(in.read(), '2');   // should still work
+
+        in.close();
+    }
+
+
+    public void testMark() throws Exception {
+        doMarkTest(new SharedFileInputStream(testInput, 10));
+
+        SharedFileInputStream in = new SharedFileInputStream(testInput, 10);
+
+        SharedFileInputStream sub = (SharedFileInputStream)in.newStream(5, -1);
+        doMarkTest(sub);
+    }
+
+
+    private void doMarkTest(SharedFileInputStream in) throws Exception {
+         assertTrue(in.markSupported());
+
+         byte[] buffer = new byte[60];
+
+         in.read();
+         in.read();
+         in.mark(50);
+
+         int markSpot = in.read();
+
+         in.read(buffer, 0, 20);
+
+         in.reset();
+
+         assertEquals(markSpot, in.read());
+         in.read(buffer, 0, 40);
+         in.reset();
+         assertEquals(markSpot, in.read());
+
+         in.read(buffer, 0, 51);
+
+         try {
+             in.reset();
+             fail();
+         } catch (IOException e) {
+         }
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/resources/test.dat
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/resources/test.dat?rev=421852&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/resources/test.dat (added)
+++ geronimo/specs/trunk/geronimo-spec-javamail-1.4/src/test/resources/test.dat Fri Jul 14
03:02:19 2006
@@ -0,0 +1 @@
+0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

Modified: geronimo/specs/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/pom.xml?rev=421852&r1=421851&r2=421852&view=diff
==============================================================================
--- geronimo/specs/trunk/pom.xml (original)
+++ geronimo/specs/trunk/pom.xml Fri Jul 14 03:02:19 2006
@@ -48,7 +48,8 @@
     <geronimoSpecsJ2eeDeploymentVersion>1.0.1</geronimoSpecsJ2eeDeploymentVersion>
     <geronimoSpecsJ2eeJaccVersion>1.0.1</geronimoSpecsJ2eeJaccVersion>
     <geronimoSpecsJ2eeManagementVersion>1.0.1</geronimoSpecsJ2eeManagementVersion>
-    <geronimoSpecsJavamailVersion>1.2-SNAPSHOT</geronimoSpecsJavamailVersion>
+    <geronimoSpecsJavamail13Version>1.2-SNAPSHOT</geronimoSpecsJavamail13Version>
+    <geronimoSpecsJavamail14Version>1.0-SNAPSHOT</geronimoSpecsJavamail14Version>
     <geronimoSpecsJaxrVersion>1.0.1</geronimoSpecsJaxrVersion>
     <geronimoSpecsJaxrpcVersion>1.0.1</geronimoSpecsJaxrpcVersion>
     <geronimoSpecsJmsVersion>1.0.1</geronimoSpecsJmsVersion>
@@ -113,7 +114,8 @@
     <module>geronimo-spec-j2ee-jacc</module>
     <module>geronimo-spec-j2ee-management</module>
     <module>geronimo-spec-j2ee</module>
-    <module>geronimo-spec-javamail</module>
+    <module>geronimo-spec-javamail-1.3.1</module>
+    <module>geronimo-spec-javamail-1.4</module>
     <module>geronimo-spec-jaxr</module>
     <module>geronimo-spec-jaxrpc</module>
     <module>geronimo-spec-jms</module>
@@ -185,7 +187,12 @@
       <dependency>
         <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-javamail_1.3.1_spec</artifactId>
-        <version>${geronimoSpecsJavamailVersion}</version>
+        <version>${geronimoSpecsJavamail13Version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-javamail_1.4_spec</artifactId>
+        <version>${geronimoSpecsJavamail14Version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.geronimo.specs</groupId>



Mime
View raw message