commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1002582 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/FilenameUtils.java test/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
Date Wed, 29 Sep 2010 18:05:51 GMT
On 29 September 2010 18:31, Niall Pemberton <niall.pemberton@gmail.com> wrote:
> On Wed, Sep 29, 2010 at 5:39 PM, sebb <sebbaz@gmail.com> wrote:
>> On 29 September 2010 12:28,  <niallp@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


Mime
View raw message