Add a trailing comment

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-28 15:35:10 +00:00
parent 22af43218a
commit 61b66220b5
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class CSVLexerTest {
"#foo\n"+ "#foo\n"+
"\n"+ "\n"+
"d,e,#no-comment\n"+ "d,e,#no-comment\n"+
"\n"; "# Final comment\n";
CSVFormat format = CSVFormat.DEFAULT.withCommentStart('#'); CSVFormat format = CSVFormat.DEFAULT.withCommentStart('#');
Lexer parser = getLexer(code, format); Lexer parser = getLexer(code, format);
@ -80,6 +80,7 @@ public class CSVLexerTest {
assertTokenEquals(TOKEN, "d", parser.nextToken(new Token())); assertTokenEquals(TOKEN, "d", parser.nextToken(new Token()));
assertTokenEquals(TOKEN, "e", parser.nextToken(new Token())); assertTokenEquals(TOKEN, "e", parser.nextToken(new Token()));
assertTokenEquals(EORECORD, "#no-comment", parser.nextToken(new Token())); assertTokenEquals(EORECORD, "#no-comment", parser.nextToken(new Token()));
assertTokenEquals(COMMENT, "", parser.nextToken(new Token()));
assertTokenEquals(EOF, "", parser.nextToken(new Token())); assertTokenEquals(EOF, "", parser.nextToken(new Token()));
assertTokenEquals(EOF, "", parser.nextToken(new Token())); assertTokenEquals(EOF, "", parser.nextToken(new Token()));