commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1307205 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
Date Fri, 30 Mar 2012 01:33:02 GMT
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());



Mime
View raw message