Add org.apache.commons.csv.CSVParserTest.testGetOneLineOneParser(). See discussion in [CSV-110].

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-04-07 14:31:03 +00:00
parent 0f3b3367c3
commit 51f226d0f8
1 changed files with 4 additions and 2 deletions

View File

@ -546,10 +546,12 @@ public class CSVParserTest {
final CSVFormat format = CSVFormat.DEFAULT;
final CSVParser parser = new CSVParser(reader, format);
try {
writer.append(CSV_INPUT_1 + format.getRecordSeparator());
writer.append(CSV_INPUT_1);
writer.append(format.getRecordSeparator());
final CSVRecord record1 = parser.nextRecord();
assertArrayEquals(RESULT[0], record1.values());
writer.append(CSV_INPUT_2 + format.getRecordSeparator());
writer.append(CSV_INPUT_2);
writer.append(format.getRecordSeparator());
final CSVRecord record2 = parser.nextRecord();
assertArrayEquals(RESULT[1], record2.values());
} finally {