You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/03/30 03:33:02 UTC

svn commit: r1307205 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java

Author: sebb
Date: Fri Mar 30 01:33:02 2012
New Revision: 1307205

URL: http://svn.apache.org/viewvc?rev=1307205&view=rev
Log:
Use public CRLF constant

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

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1307205&r1=1307204&r2=1307205&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Fri Mar 30 01:33:02 2012
@@ -298,7 +298,7 @@ public class CSVParserTest {
 
 
         CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEncapsulator('\'').withEscape('/')
-                               .withEmptyLinesIgnored(true).withLineSeparator("\r\n");
+                               .withEmptyLinesIgnored(true).withLineSeparator(CSVFormat.CRLF);
 
         CSVParser parser = new CSVParser(code, format);
         List<CSVRecord> records = parser.getRecords();
@@ -328,7 +328,7 @@ public class CSVParserTest {
 
 
         CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEscape('/')
-                .withEmptyLinesIgnored(true).withLineSeparator("\r\n");
+                .withEmptyLinesIgnored(true).withLineSeparator(CSVFormat.CRLF);
 
         CSVParser parser = new CSVParser(code, format);
         List<CSVRecord> records = parser.getRecords();
@@ -518,7 +518,7 @@ public class CSVParserTest {
 
     @Test
     public void testGetLineNumberWithCRLF() throws Exception {
-        CSVParser parser = new CSVParser("a\r\nb\r\nc", CSVFormat.DEFAULT.withLineSeparator("\r\n"));
+        CSVParser parser = new CSVParser("a\r\nb\r\nc", CSVFormat.DEFAULT.withLineSeparator(CSVFormat.CRLF));
         
         assertEquals(0, parser.getLineNumber());
         assertNotNull(parser.getRecord());