Comments
Patch
@@ -638,6 +638,8 @@
return rematch(el[:-6], l)
if el.endswith(" (glob)\n"):
return globmatch(el[:-8], l)
+ if os.altsep and l.replace('\\', '/') == el:
+ return '+glob'
return False
def tsttest(test, wd, options, replacements, env):
@@ -791,7 +793,12 @@
if pos in expected and expected[pos]:
el = expected[pos].pop(0)
- if linematch(el, lout):
+ r = linematch(el, lout)
+ if isinstance(r, str):
+ if r == '+glob':
+ lout = el[:-1] + ' (glob)\n'
+ r = False
+ if r:
postout.append(" " + el)
else:
if needescape(lout):
@@ -26,7 +26,10 @@
assert not re.search(r'[^ a-z\\/\r\n()*?]', expected + output), \
'single backslash or unknown char'
match = run_tests.linematch(expected, output)
- return bool(match)
+ if isinstance(match, str):
+ return 'special: ' + match
+ else:
+ return bool(match) # do not return match object
def wintests():
r"""test matching like running on windows
@@ -47,7 +50,7 @@
missing glob
>>> lm('/g/c/d/fg\n', '\\g\\c\\d/fg\n')
- False
+ 'special: +glob'
restore os.altsep
>>> os.altsep = _osaltsep