Skip to content

Commit 795fe61

Browse files
committed
Use public CRLF constant
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1307205 13f79535-47bb-0310-9956-ffa450edef68
1 parent d89a0f4 commit 795fe61

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/org/apache/commons/csv/CSVParserTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void testBackslashEscaping() throws IOException {
298298

299299

300300
CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEncapsulator('\'').withEscape('/')
301-
.withEmptyLinesIgnored(true).withLineSeparator("\r\n");
301+
.withEmptyLinesIgnored(true).withLineSeparator(CSVFormat.CRLF);
302302

303303
CSVParser parser = new CSVParser(code, format);
304304
List<CSVRecord> records = parser.getRecords();
@@ -328,7 +328,7 @@ public void testBackslashEscaping2() throws IOException {
328328

329329

330330
CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEscape('/')
331-
.withEmptyLinesIgnored(true).withLineSeparator("\r\n");
331+
.withEmptyLinesIgnored(true).withLineSeparator(CSVFormat.CRLF);
332332

333333
CSVParser parser = new CSVParser(code, format);
334334
List<CSVRecord> records = parser.getRecords();
@@ -518,7 +518,7 @@ public void testGetLineNumberWithLF() throws Exception {
518518

519519
@Test
520520
public void testGetLineNumberWithCRLF() throws Exception {
521-
CSVParser parser = new CSVParser("a\r\nb\r\nc", CSVFormat.DEFAULT.withLineSeparator("\r\n"));
521+
CSVParser parser = new CSVParser("a\r\nb\r\nc", CSVFormat.DEFAULT.withLineSeparator(CSVFormat.CRLF));
522522

523523
assertEquals(0, parser.getLineNumber());
524524
assertNotNull(parser.getRecord());

0 commit comments

Comments
 (0)