Skip to content

Commit d994897

Browse files
committed
Reduce dependency on DISABLED package constant
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1307186 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7d2ec7a commit d994897

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ public void testBackslashEscaping() throws IOException {
297297
};
298298

299299

300-
CSVFormat format = new CSVFormat(',', '\'', CSVFormat.DISABLED, '/', false, true, "\r\n", null);
300+
CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEncapsulator('\'').withEscape('/')
301+
.withEmptyLinesIgnored(true).withLineSeparator("\r\n");
301302

302303
CSVParser parser = new CSVParser(code, format);
303304
List<CSVRecord> records = parser.getRecords();
@@ -326,7 +327,8 @@ public void testBackslashEscaping2() throws IOException {
326327
};
327328

328329

329-
CSVFormat format = new CSVFormat(',', CSVFormat.DISABLED, CSVFormat.DISABLED, '/', false, true, "\r\n", null);
330+
CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEscape('/')
331+
.withEmptyLinesIgnored(true).withLineSeparator("\r\n");
330332

331333
CSVParser parser = new CSVParser(code, format);
332334
List<CSVRecord> records = parser.getRecords();
@@ -351,7 +353,7 @@ public void testDefaultFormat() throws IOException {
351353
};
352354

353355
CSVFormat format = CSVFormat.DEFAULT;
354-
assertEquals(CSVFormat.DISABLED, format.getCommentStart());
356+
assertFalse(format.isCommentingEnabled());
355357

356358
CSVParser parser = new CSVParser(code, format);
357359
List<CSVRecord> records = parser.getRecords();

0 commit comments

Comments
 (0)