You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2010/09/29 18:39:39 UTC

Re: svn commit: r1002582 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/FilenameUtils.java test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java

On 29 September 2010 12:28,  <ni...@apache.org> wrote:
> Author: niallp
> Date: Wed Sep 29 11:28:11 2010
> New Revision: 1002582
>
> URL: http://svn.apache.org/viewvc?rev=1002582&view=rev
> Log:
> IO-246 FilenameUtils - wildcardMatch gives incorrect results - thanks to wa
>
> Modified:
>    commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
>    commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
...

> --- commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java (original)
> +++ commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java Wed Sep 29 11:28:11 2010
> @@ -182,6 +182,30 @@ public class FilenameUtilsWildcardTestCa
>         assertMatch("log.log.abc.log.abc.d", "*log?abc?d", true);
>     }
>
> +    /**
> +     * See https://issues.apache.org/jira/browse/IO-246
> +     */
> +    public void test_IO_246() {
> +
> +        // Tests for "*?"
> +        assertMatch("aaa", "*?", false);

Why assert that this fails?

Unless "*?" is documented as being disallowed, I don't think it should
be specifically disallowed by the test.

After all, "?" can follow "*" e.g. "*.?"

I think we should just document that "*?" does not currently work.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1002582 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/FilenameUtils.java test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java

Posted by sebb <se...@gmail.com>.
On 29 September 2010 18:31, Niall Pemberton <ni...@gmail.com> wrote:
> On Wed, Sep 29, 2010 at 5:39 PM, sebb <se...@gmail.com> wrote:
>> On 29 September 2010 12:28,  <ni...@apache.org> wrote:
>>> Author: niallp
>>> Date: Wed Sep 29 11:28:11 2010
>>> New Revision: 1002582
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1002582&view=rev
>>> Log:
>>> IO-246 FilenameUtils - wildcardMatch gives incorrect results - thanks to wa
>>>
>>> Modified:
>>>    commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
>>>    commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
>> ...
>>
>>> --- commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java (original)
>>> +++ commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java Wed Sep 29 11:28:11 2010
>>> @@ -182,6 +182,30 @@ public class FilenameUtilsWildcardTestCa
>>>         assertMatch("log.log.abc.log.abc.d", "*log?abc?d", true);
>>>     }
>>>
>>> +    /**
>>> +     * See https://issues.apache.org/jira/browse/IO-246
>>> +     */
>>> +    public void test_IO_246() {
>>> +
>>> +        // Tests for "*?"
>>> +        assertMatch("aaa", "*?", false);
>>
>> Why assert that this fails?
>
> I wrote the test to investigate the bug - its clearly documented as that.

Tests are normally intended to show that a bug has been fixed.
However this assertion requires that the bug exists - I cannot see the
point of that.

>> Unless "*?" is documented as being disallowed, I don't think it should
>> be specifically disallowed by the test.
>>
>> After all, "?" can follow "*" e.g. "*.?"
>>
>> I think we should just document that "*?" does not currently work.
>
> If you want to do it then go ahead.

Will do.

> Niall
>
> ---------------------------------------------------------------------
> 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


Re: svn commit: r1002582 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/FilenameUtils.java test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java

Posted by Niall Pemberton <ni...@gmail.com>.
On Wed, Sep 29, 2010 at 5:39 PM, sebb <se...@gmail.com> wrote:
> On 29 September 2010 12:28,  <ni...@apache.org> wrote:
>> Author: niallp
>> Date: Wed Sep 29 11:28:11 2010
>> New Revision: 1002582
>>
>> URL: http://svn.apache.org/viewvc?rev=1002582&view=rev
>> Log:
>> IO-246 FilenameUtils - wildcardMatch gives incorrect results - thanks to wa
>>
>> Modified:
>>    commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
>>    commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
> ...
>
>> --- commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java (original)
>> +++ commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java Wed Sep 29 11:28:11 2010
>> @@ -182,6 +182,30 @@ public class FilenameUtilsWildcardTestCa
>>         assertMatch("log.log.abc.log.abc.d", "*log?abc?d", true);
>>     }
>>
>> +    /**
>> +     * See https://issues.apache.org/jira/browse/IO-246
>> +     */
>> +    public void test_IO_246() {
>> +
>> +        // Tests for "*?"
>> +        assertMatch("aaa", "*?", false);
>
> Why assert that this fails?

I wrote the test to investigate the bug - its clearly documented as that.

> Unless "*?" is documented as being disallowed, I don't think it should
> be specifically disallowed by the test.
>
> After all, "?" can follow "*" e.g. "*.?"
>
> I think we should just document that "*?" does not currently work.

If you want to do it then go ahead.

Niall

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org