commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306422 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
Date Wed, 28 Mar 2012 15:31:20 GMT
Author: sebb
Date: Wed Mar 28 15:31:20 2012
New Revision: 1306422

URL: http://svn.apache.org/viewvc?rev=1306422&view=rev
Log:
Don't detect comments except at start of a line

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=1306422&r1=1306421&r2=1306422&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 Wed Mar
28 15:31:20 2012
@@ -58,10 +58,10 @@ public class CSVLexerTest {
     public void testNextToken2() throws IOException {
         final String code = 
                 "1,2,3,\n"+
-                "a,b x,c\n"+
+                "a,b x,c#no-comment\n"+
                 "#foo\n"+
                 "\n"+
-                "d,e,\n"+
+                "d,e,#no-comment\n"+
                 "\n";
         CSVFormat format = CSVFormat.DEFAULT.withCommentStart('#');
         
@@ -74,12 +74,12 @@ public class CSVLexerTest {
         assertTokenEquals(EORECORD, "", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, "a", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, "b x", parser.nextToken(new Token()));
-        assertTokenEquals(EORECORD, "c", parser.nextToken(new Token()));
+        assertTokenEquals(EORECORD, "c#no-comment", parser.nextToken(new Token()));
         assertTokenEquals(COMMENT, "", parser.nextToken(new Token()));
         assertTokenEquals(EORECORD, "", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, "d", parser.nextToken(new Token()));
         assertTokenEquals(TOKEN, "e", parser.nextToken(new Token()));
-        assertTokenEquals(EORECORD, "", parser.nextToken(new Token()));
+        assertTokenEquals(EORECORD, "#no-comment", parser.nextToken(new Token()));
         assertTokenEquals(EOF, "", parser.nextToken(new Token()));
         assertTokenEquals(EOF, "", parser.nextToken(new Token()));
 



Mime
View raw message