Show More
@@ -499,6 +499,13 b' def tsttest(test, options):' | |||
|
499 | 499 | finally: |
|
500 | 500 | os.remove(name) |
|
501 | 501 | |
|
502 | def rematch(el, l): | |
|
503 | try: | |
|
504 | return re.match(el, l) | |
|
505 | except re.error: | |
|
506 | # el is an invalid regex | |
|
507 | return False | |
|
508 | ||
|
502 | 509 | pos = -1 |
|
503 | 510 | postout = [] |
|
504 | 511 | for n, l in enumerate(output): |
@@ -513,7 +520,7 b' def tsttest(test, options):' | |||
|
513 | 520 | |
|
514 | 521 | if el == l: # perfect match (fast) |
|
515 | 522 | postout.append(" " + l) |
|
516 |
elif el and re |
|
|
523 | elif el and rematch(el, l): # fallback regex match | |
|
517 | 524 | postout.append(" " + el) |
|
518 | 525 | else: # mismatch - let diff deal with it |
|
519 | 526 | postout.append(" " + l) |
General Comments 0
You need to be logged in to leave comments.
Login now