524 return rematch(res, l) |
524 return rematch(res, l) |
525 |
525 |
526 def linematch(el, l): |
526 def linematch(el, l): |
527 if el == l: # perfect match (fast) |
527 if el == l: # perfect match (fast) |
528 return True |
528 return True |
529 if (el and |
529 if el: |
530 (el.endswith(" (re)\n") and rematch(el[:-6], l) or |
530 if el.endswith(" (esc)\n"): |
531 el.endswith(" (glob)\n") and globmatch(el[:-8], l) or |
531 el = el[:-7].decode('string-escape') + '\n' |
532 el.endswith(" (esc)\n") and |
532 if el == l or os.name == 'nt' and el[:-1] + '\r\n' == l: |
533 (el[:-7].decode('string-escape') + '\n' == l or |
533 return True |
534 os.name == 'nt' and |
534 if (el.endswith(" (re)\n") and rematch(el[:-6], l) or |
535 el[:-7].decode('string-escape') + '\n' == l))): |
535 el.endswith(" (glob)\n") and globmatch(el[:-8], l)): |
536 return True |
536 return True |
537 return False |
537 return False |
538 |
538 |
539 def tsttest(test, wd, options, replacements): |
539 def tsttest(test, wd, options, replacements): |
540 # We generate a shell script which outputs unique markers to line |
540 # We generate a shell script which outputs unique markers to line |
541 # up script results with our source. These markers include input |
541 # up script results with our source. These markers include input |