You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/08/10 17:34:00 UTC

svn commit: r1371743 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java

Author: ggregory
Date: Fri Aug 10 15:34:00 2012
New Revision: 1371743

URL: http://svn.apache.org/viewvc?rev=1371743&view=rev
Log:
More tests while working out possible issue with UTF-32.

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java?rev=1371743&r1=1371742&r2=1371743&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java Fri Aug 10 15:34:00 2012
@@ -245,6 +245,22 @@ public class BOMInputStreamTest {
         parseXml(createUtf16LeDataStream(data, true));
     }
 
+    @Test
+    public void testReadXmlWithoutBOMUtf32Be() throws Exception {
+        Assume.assumeTrue(Charset.isSupported("UTF_32BE"));
+        byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32BE\"?><X/>".getBytes("UTF_32BE");
+        parseXml(new BOMInputStream(createUtf32BeDataStream(data, false)));
+        parseXml(createUtf32BeDataStream(data, false));
+    }
+
+    @Test
+    public void testReadXmlWithoutBOMUtf32Le() throws Exception {
+        Assume.assumeTrue(Charset.isSupported("UTF_32LE"));
+        byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32LE\"?><X/>".getBytes("UTF_32LE");
+        parseXml(new BOMInputStream(createUtf32LeDataStream(data, false)));
+        parseXml(createUtf32BeDataStream(data, false));
+    }
+
     @Ignore
     @Test
     public void testReadXmlWithBOMUtf32Be() throws Exception {