commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306896 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
Date Thu, 29 Mar 2012 15:10:57 GMT
Author: sebb
Date: Thu Mar 29 15:10:56 2012
New Revision: 1306896

URL: http://svn.apache.org/viewvc?rev=1306896&view=rev
Log:
CSV-35 add test

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java?rev=1306896&r1=1306895&r2=1306896&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java Thu Mar
29 15:10:56 2012
@@ -175,8 +175,8 @@ public class CSVLexerTest {
         /* file: a,\,,b
         *       \,,
         */
-        String code = "a,\\,,b\\\\\n\\,,\\\nc,d\\\n";
-        CSVFormat format = CSVFormat.DEFAULT.withEscape('\\');
+        String code = "a,\\,,b\\\\\n\\,,\\\nc,d\\\r\ne";
+        CSVFormat format = CSVFormat.DEFAULT.withEscape('\\').withEmptyLinesIgnored(false);
         assertTrue(format.isEscaping());
         Lexer parser = getLexer(code, format);
 
@@ -185,8 +185,8 @@ public class CSVLexerTest {
         assertTokenEquals(EORECORD, "b\\", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, ",", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, "\nc", parser.nextToken(new Token()));
-        assertTokenEquals(EOF, "d\n", parser.nextToken(new Token()));
-        assertTokenEquals(EOF, "", parser.nextToken(new Token()));
+        assertTokenEquals(EORECORD, "d\r", parser.nextToken(new Token()));
+        assertTokenEquals(EOF, "e", parser.nextToken(new Token()));
     }
 
     // simple token with escaping enabled



Mime
View raw message