From 50a89da39fb3f2cf126c9ba7d41a099a3e576d6c Mon Sep 17 00:00:00 2001 From: Emmanuel Bourg Date: Mon, 26 Mar 2012 23:25:48 +0000 Subject: [PATCH] Test empty files git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305668 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/java/org/apache/commons/csv/CSVParserTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java b/src/test/java/org/apache/commons/csv/CSVParserTest.java index 7e0071a4..4b73767c 100644 --- a/src/test/java/org/apache/commons/csv/CSVParserTest.java +++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java @@ -217,6 +217,12 @@ public class CSVParserTest { } } + @Test + public void testEmptyFile() throws Exception { + CSVParser parser = new CSVParser("", CSVFormat.DEFAULT); + assertNull(parser.getRecord()); + } + @Test @Ignore public void testBackslashEscapingOld() throws IOException {