Skip to content

Commit aae00f3

Browse files
committed
CSV-85 Allow comments to be returned in CSVRecord
More test cases git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306948 13f79535-47bb-0310-9956-ffa450edef68
1 parent 787ab08 commit aae00f3

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/test/resources/CSVFileParser/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The settings have the form (see test source file for full details):
1313
IgnoreEmpty=true|false
1414
IgnoreSpaces=true|false
1515
CommentStart=char
16+
CheckComments - whether the test should check comment fields as well
1617

1718
The second line is the expected output from invoking CSVFormat#toString() on the parsing format
1819

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
testCSV85.csv CommentStart=#
1+
testCSV85.csv CommentStart=# CheckComments
22
Delimiter=<,> Encapsulator=<"> CommentStart=<#>
3-
5:[a, b, c, e, f]
3+
# Comment 1
4+
5:[a, b, c, e, f]#Comment 1
45
# Very Long
56
# Comment 2
6-
5:[g, h, i, j, k]
7+
5:[g, h, i, j, k]#Very Long\nComment 2
78
# Very Long
8-
1:[]
9+
1:[]#Very Long
910
# Comment 3
10-
5:[l, m, n, o, p]
11+
5:[l, m, n, o, p]#Comment 3
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
testCSV85.csv CommentStart=#
2-
Delimiter=<,> Encapsulator=<"> CommentStart=<#>
3-
5:[a, b, c, e, f]
1+
testCSV85.csv CommentStart=# IgnoreEmpty=true CheckComments
2+
Delimiter=<,> Encapsulator=<"> CommentStart=<#> EmptyLines:ignored
3+
# Comment 1
4+
5:[a, b, c, e, f]#Comment 1
45
# Very Long
56
# Comment 2
6-
5:[g, h, i, j, k]
7+
5:[g, h, i, j, k]#Very Long\nComment 2
78
# Very Long
8-
1:[]
99
# Comment 3
10-
5:[l, m, n, o, p]
10+
5:[l, m, n, o, p]#Very Long\nComment 3

0 commit comments

Comments
 (0)