commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1200697 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
Date Fri, 11 Nov 2011 02:22:48 GMT
Author: sebb
Date: Fri Nov 11 02:22:48 2011
New Revision: 1200697

URL: http://svn.apache.org/viewvc?rev=1200697&view=rev
Log:
Check files fail to compare byte-wise

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

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java?rev=1200697&r1=1200696&r2=1200697&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java Fri
Nov 11 02:22:48 2011
@@ -601,6 +601,15 @@ public class FileUtilsTestCase extends F
         assertTrue(FileUtils.contentEqualsIgnoreEOL(cr, lf, null));
         assertTrue(FileUtils.contentEqualsIgnoreEOL(crlf, lf, null));
 
+        // Check the files behave OK when EOL is not ignored
+        assertTrue(FileUtils.contentEquals(cr, cr));
+        assertTrue(FileUtils.contentEquals(crlf, crlf));
+        assertTrue(FileUtils.contentEquals(lf, lf));
+
+        assertFalse(FileUtils.contentEquals(cr, crlf));
+        assertFalse(FileUtils.contentEquals(cr, lf));
+        assertFalse(FileUtils.contentEquals(crlf, lf));
+
         // Equal files
         file1.createNewFile();
         file2.createNewFile();



Mime
View raw message