// won't round-trip public void testEmptyQuote() { assertEquals(CSV.split("a,\"\",b"), List.of("a", "", "b")); }
// won't round-trip public void testExtraQuote() { assertEquals(CSV.split("a,\"b\",c"), List.of("a", "b", "c")); }
@Test(dataProvider = "csvdata") public void roundTrip(String input, List<String> parsed) { List<String> actual = CSV.split(input); assertEquals(actual, parsed); CSV.write(out, actual.toArray()); checkString(input); }
@Test(expectedExceptions = CSVParseException.class) public void errorUnclosedQuote() { CSV.split("a,\"b"); }
@Test(expectedExceptions = CSVParseException.class) public void errorCharacterAfterQuote() { CSV.split("a,\"b\"c,d"); }
@Test(expectedExceptions = CSVParseException.class) public void errorUnexpectedQuote() { CSV.split("ab\"cd"); }