You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Emmanuel Bourg <eb...@apache.org> on 2012/03/29 02:28:49 UTC
Re: svn commit: r1306315 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
I'm not sure to understand why this test is changed. If we drop trailing
comments it seems important to test they aren't not handled. A dash in a
field should not be mistaken with a comment.
Emmanuel Bourg
Le 28/03/2012 15:34, sebb@apache.org a écrit :
> Author: sebb
> Date: Wed Mar 28 13:34:21 2012
> New Revision: 1306315
>
> URL: http://svn.apache.org/viewvc?rev=1306315&view=rev
> Log:
> CSV-84 Clarify comment handling
> Fix test case which expected to handle a trailing comment
>
> Modified:
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
>
> Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1306315&r1=1306314&r2=1306315&view=diff
> ==============================================================================
> --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
> +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Wed Mar 28 13:34:21 2012
> @@ -332,12 +332,12 @@ public class CSVParserTest {
> String code = ""
> + "a,b\n" // 1)
> + "\"\n\",\" \"\n" // 2)
> - + "\"\",#\n" // 3)
> + + "#,\"\"\n" // 3)
> ;
> String[][] res = {
> {"a", "b"},
> {"\n", " "},
> - {"", "#"},
> + {"#", ""},
> };
>
> CSVFormat format = CSVFormat.DEFAULT;
> @@ -352,7 +352,7 @@ public class CSVParserTest {
> String[][] res_comments = {
> {"a", "b"},
> {"\n", " "},
> - {""},
> + {},
> };
>
> format = CSVFormat.DEFAULT.withCommentStart('#');
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1306315 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
Posted by sebb <se...@gmail.com>.
On 29 March 2012 01:28, Emmanuel Bourg <eb...@apache.org> wrote:
> I'm not sure to understand why this test is changed.
Because it was broken - it was trying to show that comments were being
processed at the start of a field.
> If we drop trailing comments it seems important to test they aren't not handled.
s/aren't not/are not/
> A dash in a field should not be mistaken with a comment.
s/dash/hash/
That is tested elsewhere, but one could add back the trailing comments
to the original test.
> Emmanuel Bourg
>
>
> Le 28/03/2012 15:34, sebb@apache.org a écrit :
>>
>> Author: sebb
>> Date: Wed Mar 28 13:34:21 2012
>> New Revision: 1306315
>>
>> URL: http://svn.apache.org/viewvc?rev=1306315&view=rev
>> Log:
>> CSV-84 Clarify comment handling
>> Fix test case which expected to handle a trailing comment
>>
>> Modified:
>>
>> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
>>
>> Modified:
>> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
>> URL:
>> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1306315&r1=1306314&r2=1306315&view=diff
>>
>> ==============================================================================
>> ---
>> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
>> (original)
>> +++
>> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
>> Wed Mar 28 13:34:21 2012
>> @@ -332,12 +332,12 @@ public class CSVParserTest {
>> String code = ""
>> + "a,b\n" // 1)
>> + "\"\n\",\" \"\n" // 2)
>> - + "\"\",#\n" // 3)
>> + + "#,\"\"\n" // 3)
>> ;
>> String[][] res = {
>> {"a", "b"},
>> {"\n", " "},
>> - {"", "#"},
>> + {"#", ""},
>> };
>>
>> CSVFormat format = CSVFormat.DEFAULT;
>> @@ -352,7 +352,7 @@ public class CSVParserTest {
>> String[][] res_comments = {
>> {"a", "b"},
>> {"\n", " "},
>> - {""},
>> + {},
>> };
>>
>> format = CSVFormat.DEFAULT.withCommentStart('#');
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org