changeset 12721:d4e21a9de8bc

tests: accept \-escaped test output It changes tsttest to accept expected outputs in python-style \-escapes. It aims to avoid trouble with outputs for non-ascii, color and progress tests.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 02 Oct 2010 22:57:25 +0900
parents 97fd67f35c00
children 22f45e53bb21
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue Oct 12 16:26:03 2010 -0500
+++ b/tests/run-tests.py	Sat Oct 02 22:57:25 2010 +0900
@@ -546,6 +546,8 @@
 
             if el == l: # perfect match (fast)
                 postout.append("  " + l)
+            elif el and el.decode('string-escape') == l:
+                postout.append("  " + el)  # \-escape match
             elif (el and
                   (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', l) or
                    el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', l))):