Show More
@@ -606,7 +606,7 b' def globmatch(el, l):' | |||||
606 | if el + '\n' == l: |
|
606 | if el + '\n' == l: | |
607 | if os.altsep: |
|
607 | if os.altsep: | |
608 | # matching on "/" is not needed for this line |
|
608 | # matching on "/" is not needed for this line | |
609 | log("\nInfo, unnecessary glob: %s (glob)" % el) |
|
609 | return '-glob' | |
610 | return True |
|
610 | return True | |
611 | i, n = 0, len(el) |
|
611 | i, n = 0, len(el) | |
612 | res = '' |
|
612 | res = '' | |
@@ -798,6 +798,13 b' def tsttest(test, wd, options, replaceme' | |||||
798 | if r == '+glob': |
|
798 | if r == '+glob': | |
799 | lout = el[:-1] + ' (glob)\n' |
|
799 | lout = el[:-1] + ' (glob)\n' | |
800 | r = False |
|
800 | r = False | |
|
801 | elif r == '-glob': | |||
|
802 | log('\ninfo, unnecessary glob in %s (after line %d):' | |||
|
803 | ' %s (glob)\n' % (test, pos, el[-1])) | |||
|
804 | r = True # pass on unnecessary glob | |||
|
805 | else: | |||
|
806 | log('\ninfo, unknown linematch result: %r\n' % r) | |||
|
807 | r = False | |||
801 | if r: |
|
808 | if r: | |
802 | postout.append(" " + el) |
|
809 | postout.append(" " + el) | |
803 | else: |
|
810 | else: |
@@ -45,9 +45,7 b' def wintests():' | |||||
45 |
|
45 | |||
46 | direct matching, glob unnecessary |
|
46 | direct matching, glob unnecessary | |
47 | >>> lm('g/b (glob)\n', 'g/b\n') |
|
47 | >>> lm('g/b (glob)\n', 'g/b\n') | |
48 | <BLANKLINE> |
|
48 | 'special: -glob' | |
49 | Info, unnecessary glob: g/b (glob) |
|
|||
50 | True |
|
|||
51 |
|
49 | |||
52 | missing glob |
|
50 | missing glob | |
53 | >>> lm('/g/c/d/fg\n', '\\g\\c\\d/fg\n') |
|
51 | >>> lm('/g/c/d/fg\n', '\\g\\c\\d/fg\n') |
General Comments 0
You need to be logged in to leave comments.
Login now