@@ -429,14 +429,17 @@ void testQuoteCharEscapedWithQuoteModeNone() throws IOException {
429429 final StringWriter sw = new StringWriter ();
430430 try (CSVPrinter printer = new CSVPrinter (sw , format )) {
431431 printer .printRecord ("\" abc" , "x\" y" );
432+ printer .printRecord (new StringReader ("\" abc" ), new StringReader ("x\" y" ));
432433 }
433- assertEquals ("?\" abc,x?\" y\r \n " , sw .toString ());
434- // The emitted record must read back as the original values.
434+ assertEquals ("?\" abc,x?\" y" + RECORD_SEPARATOR + "? \" abc,x? \" y" + RECORD_SEPARATOR , sw .toString ());
435+ // The emitted records must read back as the original values.
435436 try (CSVParser parser = CSVParser .parse (sw .toString (), format )) {
436437 final List <CSVRecord > records = parser .getRecords ();
437- assertEquals (1 , records .size ());
438- assertEquals ("\" abc" , records .get (0 ).get (0 ));
439- assertEquals ("x\" y" , records .get (0 ).get (1 ));
438+ assertEquals (2 , records .size ());
439+ for (final CSVRecord record : records ) {
440+ assertEquals ("\" abc" , record .get (0 ));
441+ assertEquals ("x\" y" , record .get (1 ));
442+ }
440443 }
441444 }
442445
0 commit comments