Commit Graph

512 Commits

Author SHA1 Message Date
Sebastian Bazley 5a925ff1ff Another baseline
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1307043 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 18:49:20 +00:00
Sebastian Bazley 3296f59696 Javadoc tweak
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1307042 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 18:48:47 +00:00
Sebastian Bazley aae00f39ad 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
2012-03-29 16:03:32 +00:00
Sebastian Bazley 787ab08db9 CSV-85 Allow comments to be returned in CSVRecord
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306947 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 16:03:03 +00:00
Sebastian Bazley e94085595f CSV-35 add test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306896 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 15:10:56 +00:00
Sebastian Bazley a07c9f72fc Improve escape tests
Fix bug in readEscape() - was not handling EOF

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306890 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 15:01:04 +00:00
Sebastian Bazley 5c9697c158 More debug
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306889 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 14:57:55 +00:00
Sebastian Bazley cee5cc3d74 CSV-69 Eliminate CSVPrinterTest.equals(String[][], String[][]) by using Assert.assertArrayEquals
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306833 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 13:09:43 +00:00
Sebastian Bazley 9d00beb352 CSV-69 Utility methods for comparing results
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306828 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 13:02:27 +00:00
Sebastian Bazley 8462234502 We don't care if trailing LF has been consumed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306797 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 12:03:53 +00:00
Sebastian Bazley a5b76b6c20 Fix revision
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306789 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 11:35:20 +00:00
Sebastian Bazley 517bf0d583 Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306784 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 10:57:55 +00:00
Sebastian Bazley fe10274918 Test comments and blank lines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306668 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 01:25:47 +00:00
Sebastian Bazley 3fd45b5441 Have to check for comment after dealing with empty lines.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306667 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 01:24:24 +00:00
Sebastian Bazley 9ce0716a43 Save current lexer for comparisons
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306664 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 01:10:25 +00:00
Sebastian Bazley 19ba389fe8 Checking the token type seems to be quite slow
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306663 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:58:36 +00:00
Sebastian Bazley 810c8d0ae5 Initial tests for CSV-85 - to be updated when issue is implemented
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306662 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:46:54 +00:00
Sebastian Bazley 9dd5ace960 More blank line tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306661 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:45:39 +00:00
Sebastian Bazley 49c9a67b26 Add back trailing comment test (this time with correct expected results)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306660 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:43:34 +00:00
Sebastian Bazley a4dd5eb503 Add a few more blank lines to the test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306659 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:31:16 +00:00
Sebastian Bazley 03dbcf48c0 Test with empty lines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306651 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:05:45 +00:00
Sebastian Bazley 02a36dd41d Test multiple adjacent comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306650 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:03:19 +00:00
Sebastian Bazley 70f00f973a Fix readLine() so can still detect start of line next time round
Also fix broken test: format was set to ignore empty lines, yet it checked for one

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306649 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 00:02:35 +00:00
Sebastian Bazley 7addc8f688 Misplaced comment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306643 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 23:35:09 +00:00
Sebastian Bazley 8cd4024e6d Add experimental state-driven lexer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306519 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 18:12:08 +00:00
Sebastian Bazley 6ca0f78156 Allow for new COMMENT token type
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306516 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 17:56:53 +00:00
Sebastian Bazley 61b66220b5 Add a trailing comment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306432 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 15:35:10 +00:00
Sebastian Bazley 22af43218a Don't detect comments except at start of a line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306422 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 15:31:20 +00:00
Sebastian Bazley a708256b65 Make lines clearer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306414 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 15:27:53 +00:00
Sebastian Bazley 67390ea304 Handle CommentStart option
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306345 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 14:06:01 +00:00
Sebastian Bazley fcfb6dc7c5 CSV-84 Clarify comment handling
Test was wrong; line comment should have been dropped entirely.
Fix record handling accordingly

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306342 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 14:05:25 +00:00
Sebastian Bazley e922bf949a CSV-84 Clarify comment handling
Fix code so comment only detected at start of a line

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306325 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:46:27 +00:00
Sebastian Bazley 05b5c8ef48 Revert r1306321 - committed wrong file
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306324 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:44:38 +00:00
Sebastian Bazley 0fee01aa2d Add method for detecting start of line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306322 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:41:42 +00:00
Sebastian Bazley 93089b260c Add method for detecting start of line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306321 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:40:46 +00:00
Sebastian Bazley 6a91c05061 CSV-84 Clarify comment handling
Document how comment behaves

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306316 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:35:38 +00:00
Sebastian Bazley f299569070 CSV-84 Clarify comment handling
Fix test case which expected to handle a trailing comment

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306315 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:34:21 +00:00
Sebastian Bazley 0fb414b6f2 Give a bit more detail when reporting an error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306313 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:32:14 +00:00
Sebastian Bazley c510c7222f Tidy up; rename shared fields to be clearer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306307 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 13:18:11 +00:00
Sebastian Bazley ba26844c7b CSV-70 Improve readability of CSVLexer
Simplify; remove while(true) loop

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306079 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 00:34:27 +00:00
Sebastian Bazley 7c2cfeaf58 lastChar cannot possibly be EOF if it is CR, LF or UNDEFINED
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306073 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 00:22:25 +00:00
Sebastian Bazley 0a0f3bbd36 CSV-70 Improve readability of CSVLexer
Introduce COMMENT type

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306064 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 00:01:43 +00:00
Sebastian Bazley 9114337075 CSV-70 Improve readability of CSVLexer
Remove unnecessary parameters

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306062 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 23:50:04 +00:00
Sebastian Bazley fba580930f Provide toString method for IDE debugging
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306047 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 23:11:32 +00:00
Sebastian Bazley bf1d01d79d More info
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306046 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 23:10:32 +00:00
Sebastian Bazley 1337758f9f Use super-class rather than specific implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306045 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 23:10:08 +00:00
Sebastian Bazley bfc40dede6 Add CSV file parser test case runner
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305919 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 17:32:15 +00:00
Sebastian Bazley f921e77605 Provide test access to PRISTINE
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305705 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 01:31:33 +00:00
Sebastian Bazley aeef773ed6 Calculate the booleans once; prepares for CSV-78
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305700 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 01:07:30 +00:00
Sebastian Bazley 8a683f009d CSV-75 ExtendedBufferReader does not handle EOL consistently
Fix tests

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305695 13f79535-47bb-0310-9956-ffa450edef68
2012-03-27 00:54:36 +00:00