commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1371743 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
Date Fri, 10 Aug 2012 15:34:00 GMT
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 {



Mime
View raw message