@@ -299,23 +299,24 @@ public void testEmptyLineBehaviourExcel() throws Exception {
299299 }
300300 }
301301
302- // @Test
303- // public void testStartWithEmptyLinesThenHeaders() throws Exception {
304- // 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",
305- // "hello,\"\"\n\n\n" };
306- // final String[][] res = { { "hello", "" }, { "" }, // Excel format does not ignore empty lines
307- // { "" } };
308- // for (final String code : codes) {
309- // final CSVParser parser = CSVParser.parse(code, CSVFormat.EXCEL);
310- // final List<CSVRecord> records = parser.getRecords();
311- // assertEquals(res.length, records.size());
312- // assertTrue(records.size() > 0);
313- // for (int i = 0; i < res.length; i++) {
314- // assertArrayEquals(res[i], records.get(i).values());
315- // }
316- // parser.close();
317- // }
318- // }
302+ @ Test
303+ @ Ignore
304+ public void testStartWithEmptyLinesThenHeaders () throws Exception {
305+ final String [] codes = {"\r \n \r \n \r \n hello,\r \n \r \n \r \n " , "hello,\n \n \n " , "hello,\" \" \r \n \r \n \r \n " ,
306+ "hello,\" \" \n \n \n " };
307+ final String [][] res = {{"hello" , "" }, {"" }, // Excel format does not ignore empty lines
308+ {"" }};
309+ for (final String code : codes ) {
310+ final CSVParser parser = CSVParser .parse (code , CSVFormat .EXCEL );
311+ final List <CSVRecord > records = parser .getRecords ();
312+ assertEquals (res .length , records .size ());
313+ assertTrue (records .size () > 0 );
314+ for (int i = 0 ; i < res .length ; i ++) {
315+ assertArrayEquals (res [i ], records .get (i ).values ());
316+ }
317+ parser .close ();
318+ }
319+ }
319320
320321 @ Test
321322 public void testEndOfFileBehaviorCSV () throws Exception {
0 commit comments