Notation.Glob.union: Wildcard is ignored in some cases
onury opened this issue · 1 comments
onury commented
Notation.Glob.union(globsA, globsB)
Case 1
If any of the passed globs is ['*']
(single item, only wildcard); it should cover all — no matter what the other glob array includes.
Globs A |
Globs B |
Outputs | Expected |
---|---|---|---|
['*'] |
['*', '!id'] |
[ '*', '!id' ] |
['*'] |
A
has all attributes, including 'id'
; which should be covered in the united output.
Case 2
A negated glob should only be included in the united output; if it exists in both original arrays.
Globs A |
Globs B |
Outputs | Expected |
---|---|---|---|
['*', '!id'] |
['*', '!pwd'] |
[ '*', '!pwd' ] |
['*'] |
Above, A
negates id
but has pwd
and B
negates pwd
but has id
. So both id
and pwd
should be available in the united output. e.g. ['*', 'id', 'pwd']
» normalizes to ['*']
Globs A |
Globs B |
Outputs | Expected |
---|---|---|---|
['*', '!id'] |
['*', '!id', '!pwd'] |
[ '*', '!pwd' ] |
['*', '!id'] |
Above, both A
and B
has !id
so it should be included in the union; but not !pwd
since only B
negates it.
onury commented
Fixed in v1.3.0