Handle CommentStart option

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-28 14:06:01 +00:00
parent fcfb6dc7c5
commit 67390ea304
2 changed files with 4 additions and 0 deletions

View File

@ -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);
}

View File

@ -11,6 +11,8 @@ The first line of this file consists of several space-separated fields:
- (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