]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - basic/runtime/org.argeo.basic.nodeps/src/test/java/org/argeo/util/CsvParserTestCase.java
Deactivate encryption tests
[lgpl/argeo-commons.git] / basic / runtime / org.argeo.basic.nodeps / src / test / java / org / argeo / util / CsvParserTestCase.java
index 0b17d67b562fcb59a57a535d3c0bc7bab016d2ef..1e032357a2d6376e004fe04eef5596f810559d7c 100644 (file)
@@ -8,10 +8,10 @@ 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";
+               String toParse = "Header1,\"Header\n2\",Header3,\"Header4\"\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();
        }
+
 }