Show More
@@ -638,6 +638,8 b' def linematch(el, l):' | |||
|
638 | 638 | return rematch(el[:-6], l) |
|
639 | 639 | if el.endswith(" (glob)\n"): |
|
640 | 640 | return globmatch(el[:-8], l) |
|
641 | if os.altsep and l.replace('\\', '/') == el: | |
|
642 | return '+glob' | |
|
641 | 643 | return False |
|
642 | 644 | |
|
643 | 645 | def tsttest(test, wd, options, replacements, env): |
@@ -791,7 +793,12 b' def tsttest(test, wd, options, replaceme' | |||
|
791 | 793 | if pos in expected and expected[pos]: |
|
792 | 794 | el = expected[pos].pop(0) |
|
793 | 795 | |
|
794 |
|
|
|
796 | r = linematch(el, lout) | |
|
797 | if isinstance(r, str): | |
|
798 | if r == '+glob': | |
|
799 | lout = el[:-1] + ' (glob)\n' | |
|
800 | r = False | |
|
801 | if r: | |
|
795 | 802 | postout.append(" " + el) |
|
796 | 803 | else: |
|
797 | 804 | if needescape(lout): |
@@ -27,7 +27,10 b' def lm(expected, output):' | |||
|
27 | 27 | assert not re.search(r'[^ \w\\/\r\n()*?]', expected + output), \ |
|
28 | 28 | 'single backslash or unknown char' |
|
29 | 29 | match = run_tests.linematch(expected, output) |
|
30 | return bool(match) | |
|
30 | if isinstance(match, str): | |
|
31 | return 'special: ' + match | |
|
32 | else: | |
|
33 | return bool(match) # do not return match object | |
|
31 | 34 | |
|
32 | 35 | def wintests(): |
|
33 | 36 | r"""test matching like running on windows |
@@ -48,7 +51,7 b' def wintests():' | |||
|
48 | 51 | |
|
49 | 52 | missing glob |
|
50 | 53 | >>> lm('/g/c/d/fg\n', '\\g\\c\\d/fg\n') |
|
51 | False | |
|
54 | 'special: +glob' | |
|
52 | 55 | |
|
53 | 56 | restore os.altsep |
|
54 | 57 | >>> os.altsep = _osaltsep |
General Comments 0
You need to be logged in to leave comments.
Login now