Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

When using Ant Selector, multiple wildcards in filename does not work #81

Closed
chrisbrookes opened this issue Aug 21, 2018 · 1 comment
Closed

Comments

@chrisbrookes
Copy link

Specifically this test (added to AntPatternSelectorSpec) does not work:

        'Select files by multiple *-wildcard' : [
            filter : {
                include 'subdirA/subdirB/*ile7*.txt'
            },
            included : [
                'subdirA/subdirB/file777.txt'
            ]
        ],
Condition not satisfied:

testsets[testName].included == structure.findAll { aps.allowed(it) }
|       ||         |        |  |         |
|       ||         |        |  |         [subdirA/subdirB/file5.txt, subdirA/subdirB/file6.txt, subdirA/subdirB/file777.txt]
|       ||         |        |  [file1.txt, file2.txt, subdirA/file3.txt, subdirA/file4.txt, subdirA/subdirB/file5.txt, subdirA/subdirB/file6.txt, subdirA/subdirB/file777.txt]
|       ||         |        false
|       ||         [subdirA/subdirB/file777.txt]
|       |Select files by multiple *-wildcard
|       [filter:org.ysb33r.groovy.dsl.vfs.impl.AntPatternSelectorSpec$__clinit__closure6@50ecb566, included:[subdirA/subdirB/file777.txt]]
...

	at org.ysb33r.groovy.dsl.vfs.impl.AntPatternSelectorSpec.AntPattern Selector Internals: #testName(AntPatternSelectorSpec.groovy:151)

I have a fix so will make a PR.

chrisbrookes pushed a commit to chrisbrookes/groovy-vfs that referenced this issue Aug 21, 2018
ysb33r added a commit that referenced this issue Aug 22, 2018
Fix for #81, fixed logic in match method
@ysb33r
Copy link
Owner

ysb33r commented Aug 22, 2018

Released in 1.0.1. Thanks @chrisbrookes !

@ysb33r ysb33r closed this as completed Aug 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants