You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2014/10/29 08:56:01 UTC

svn commit: r1635065 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java

Author: britter
Date: Wed Oct 29 07:56:01 2014
New Revision: 1635065

URL: http://svn.apache.org/r1635065
Log:
Use @Ignore instead of commenting out code.

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1635065&r1=1635064&r2=1635065&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Wed Oct 29 07:56:01 2014
@@ -299,23 +299,24 @@ public class CSVParserTest {
         }
     }
 
-    // @Test
-    // public void testStartWithEmptyLinesThenHeaders() throws Exception {
-    // final String[] codes = { "\r\n\r\n\r\nhello,\r\n\r\n\r\n", "hello,\n\n\n", "hello,\"\"\r\n\r\n\r\n",
-    // "hello,\"\"\n\n\n" };
-    // final String[][] res = { { "hello", "" }, { "" }, // Excel format does not ignore empty lines
-    // { "" } };
-    // for (final String code : codes) {
-    // final CSVParser parser = CSVParser.parse(code, CSVFormat.EXCEL);
-    // final List<CSVRecord> records = parser.getRecords();
-    // assertEquals(res.length, records.size());
-    // assertTrue(records.size() > 0);
-    // for (int i = 0; i < res.length; i++) {
-    // assertArrayEquals(res[i], records.get(i).values());
-    // }
-    // parser.close();
-    // }
-    // }
+    @Test
+    @Ignore
+    public void testStartWithEmptyLinesThenHeaders() throws Exception {
+        final String[] codes = {"\r\n\r\n\r\nhello,\r\n\r\n\r\n", "hello,\n\n\n", "hello,\"\"\r\n\r\n\r\n",
+                "hello,\"\"\n\n\n"};
+        final String[][] res = {{"hello", ""}, {""}, // Excel format does not ignore empty lines
+                {""}};
+        for (final String code : codes) {
+            final CSVParser parser = CSVParser.parse(code, CSVFormat.EXCEL);
+            final List<CSVRecord> records = parser.getRecords();
+            assertEquals(res.length, records.size());
+            assertTrue(records.size() > 0);
+            for (int i = 0; i < res.length; i++) {
+                assertArrayEquals(res[i], records.get(i).values());
+            }
+            parser.close();
+        }
+    }
 
     @Test
     public void testEndOfFileBehaviorCSV() throws Exception {