Node.ant_glob: Do not ignore case by default, as specified by the documentation.

This commit is contained in:
Calle Rosenquist 2017-09-19 13:27:57 +00:00 committed by ita1024
parent 1354a37255
commit 69e45d1a71
2 changed files with 5 additions and 1 deletions

View File

@ -140,8 +140,12 @@ def test(ctx):
create('src/b.txt')
nd = bld.srcnode.make_node('c.txt')
nd.write("test")
create('d.TXT')
nd2 = bld.srcnode.make_node('d.TXT')
nd2.write("test")
tt("ant_glob ->", len(bld.srcnode.ant_glob('*.txt', flat=False)), 1)
tt("ant_glob (icase) ->", len(bld.srcnode.ant_glob('*.txt', flat=False, ignorecase=True)), 2)
#print("ant_glob src ->", bld.srcnode.ant_glob('*.txt'))
def abspath(self):

View File

@ -624,7 +624,7 @@ class Node(object):
excl = kw.get('excl', exclude_regs)
incl = k and k[0] or kw.get('incl', '**')
reflags = kw.get('ignorecase', re.I)
reflags = re.I if kw.get('ignorecase', False) else 0
def to_pat(s):
ret = []