Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E1CE9B82 for ; Wed, 28 Mar 2012 14:06:23 +0000 (UTC) Received: (qmail 78612 invoked by uid 500); 28 Mar 2012 14:06:23 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 78556 invoked by uid 500); 28 Mar 2012 14:06:23 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 78545 invoked by uid 99); 28 Mar 2012 14:06:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2012 14:06:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2012 14:06:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C13482388BA6 for ; Wed, 28 Mar 2012 14:06:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1306345 - in /commons/proper/csv/trunk/src/test: java/org/apache/commons/csv/CSVFileParserTest.java resources/CSVFileParser/README.txt Date: Wed, 28 Mar 2012 14:06:01 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120328140601.C13482388BA6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Wed Mar 28 14:06:01 2012 New Revision: 1306345 URL: http://svn.apache.org/viewvc?rev=1306345&view=rev Log: Handle CommentStart option Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java commons/proper/csv/trunk/src/test/resources/CSVFileParser/README.txt Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java?rev=1306345&r1=1306344&r2=1306345&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java (original) +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java Wed Mar 28 14:06:01 2012 @@ -96,6 +96,8 @@ public class CSVFileParserTest { fmt = fmt.withEmptyLinesIgnored(Boolean.parseBoolean(option_parts[1])); } else if ("IgnoreSpaces".equalsIgnoreCase(option_parts[0])) { fmt = fmt.withSurroundingSpacesIgnored(Boolean.parseBoolean(option_parts[1])); + } else if ("CommentStart".equalsIgnoreCase(option_parts[0])) { + fmt = fmt.withCommentStart(option_parts[1].charAt(0)); } else { fail(testName+" unexpected option: "+option); } Modified: commons/proper/csv/trunk/src/test/resources/CSVFileParser/README.txt URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/resources/CSVFileParser/README.txt?rev=1306345&r1=1306344&r2=1306345&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/resources/CSVFileParser/README.txt (original) +++ commons/proper/csv/trunk/src/test/resources/CSVFileParser/README.txt Wed Mar 28 14:06:01 2012 @@ -11,6 +11,8 @@ The first line of this file consists of - (optional) settings to be applied to the default parsing format, which is delim=',' encap='"' The settings have the form (see test source file for full details): IgnoreEmpty=true|false +IgnoreSpaces=true|false +CommentStart=char The second line is the expected output from invoking CSVFormat#toString() on the parsing format