From: <zep...@us...> - 2006-10-30 12:20:42
|
Revision: 149 http://svn.sourceforge.net/pzfilereader/?rev=149&view=rev Author: zepernick Date: 2006-10-30 04:20:35 -0800 (Mon, 30 Oct 2006) Log Message: ----------- added 2 more extreme tests. Possible bug on the last test. Needs more discussion. Modified Paths: -------------- trunk/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java Modified: trunk/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java =================================================================== --- trunk/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java 2006-10-30 12:05:55 UTC (rev 148) +++ trunk/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java 2006-10-30 12:20:35 UTC (rev 149) @@ -113,15 +113,17 @@ //2 = b //3 = c" --> same as #1 check("a\",b,c\"", ',', '\"', new String[] { "a\"", "b", "c\"" }); - - - - check("\" a,b,c\"", ',', '\"', new String[] { "a,b,c" }); - //check(" a, b ,c ", ',', '\"', new String[] { "a","b","c" }); - //++++++I think this should probably generate this - check(" a, b ,c ", ',', '\"', new String[] { "a, b ,c" }); + //should not trim leading space inside of a qualified element + check("\" a,b,c\"", ',', '\"', new String[] { " a,b,c" }); + check(" a, b ,c ", ',', '\"', new String[] { "a","b","c" }); // Paul... please put some more whacky stuff here... + check("\"a\", b , \"c\"", ',', '\"', new String[] {"a","b","c"}); + //check malformed data + //TODO - I believe this should be producing 2 elements. As soon as their is a + //delimter followed by a qualifier a new element shoudl be created + //+++Any thoughts Benoit? + check("\"a, b,\"c\"", ',', '\"', new String[] {"a, b", "c"}); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |