camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r771029 - /camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java
Date Sun, 03 May 2009 05:38:35 GMT
Author: ningjiang
Date: Sun May  3 05:38:35 2009
New Revision: 771029

URL: http://svn.apache.org/viewvc?rev=771029&view=rev
Log:
Fixed the IOConverterTest error on Windows box

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java?rev=771029&r1=771028&r2=771029&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java Sun
May  3 05:38:35 2009
@@ -36,7 +36,12 @@
         byte[] data = IOConverter.toBytes(new FileInputStream(file));
         assertEquals("get the wrong byte size", file.length(), data.length);
         assertEquals('#', (char) data[0]);
-        assertEquals('!', (char) data[data.length - 2]);
+        char testChar = (char) data[data.length - 2];
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            // to skip the "0D" character
+            testChar = (char) data[data.length - 3];
+        }
+        assertEquals('!', testChar);
         // should end with a new line
         assertEquals('\n', (char) data[data.length - 1]);
     }



Mime
View raw message