X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=basic%2Fruntime%2Forg.argeo.basic.nodeps%2Fsrc%2Ftest%2Fjava%2Forg%2Fargeo%2Futil%2FCsvParserTestCase.java;h=363de8bc51683ab167db7e58c73d6b15178a268e;hb=2c834078d24857f491d60a4677c4f2f658a2f7fe;hp=0b17d67b562fcb59a57a535d3c0bc7bab016d2ef;hpb=56472382695a908e322c711070116aa64ca53b85;p=lgpl%2Fargeo-commons.git diff --git a/basic/runtime/org.argeo.basic.nodeps/src/test/java/org/argeo/util/CsvParserTestCase.java b/basic/runtime/org.argeo.basic.nodeps/src/test/java/org/argeo/util/CsvParserTestCase.java index 0b17d67b5..363de8bc5 100644 --- a/basic/runtime/org.argeo.basic.nodeps/src/test/java/org/argeo/util/CsvParserTestCase.java +++ b/basic/runtime/org.argeo.basic.nodeps/src/test/java/org/argeo/util/CsvParserTestCase.java @@ -9,9 +9,9 @@ import junit.framework.TestCase; public class CsvParserTestCase extends TestCase { public void testParse() throws Exception { String toParse = "Header1,\"Header2\",Header3,\"Header4\"\n" - + "Col1,\"Col2\",Col3,\"\"\"Col4\"\"\"\n" - + "Col1,\"Col2\",Col3,\"\"\"Col4\"\"\"\n" - + "Col1,\"Col2\",Col3,\"\"\"Col4\"\"\"\n"; + + "Col1,\"Col\n2\",Col3,\"\"\"Col4\"\"\"\n" + + "Col1,\"Col\n2\",Col3,\"\"\"Col4\"\"\"\n" + + "Col1,\"Col\n2\",Col3,\"\"\"Col4\"\"\"\n"; InputStream in = new ByteArrayInputStream(toParse.getBytes()); @@ -21,7 +21,7 @@ public class CsvParserTestCase extends TestCase { assertEquals(header.size(), tokens.size()); assertEquals(4, tokens.size()); assertEquals("Col1", tokens.get(0)); - assertEquals("Col2", tokens.get(1)); + assertEquals("Col\n2", tokens.get(1)); assertEquals("Col3", tokens.get(2)); assertEquals("\"Col4\"", tokens.get(3)); } @@ -30,4 +30,5 @@ public class CsvParserTestCase extends TestCase { csvParser.parse(in); in.close(); } + }