@Test public void testDoubleQuotes() { final CsvLineParser parser = new CsvLineParser(); final String s = "a,\"\"\"b\"\"\",c"; final List<String> list = parser.parse(s); assertEquals(3, list.size()); assertEquals("a", list.get(0)); assertEquals("\"b\"", list.get(1)); assertEquals("c", list.get(2)); }
@Test public void testSimpleLineParse() { final CsvLineParser parser = new CsvLineParser(); final String s = "a,b,c"; final List<String> list = parser.parse(s); assertEquals(3, list.size()); assertEquals("a", list.get(0)); assertEquals("b", list.get(1)); assertEquals("c", list.get(2)); }