tests: accept \-escaped test output stable
authorYuya Nishihara <yuya@tcha.org>
Sat, 02 Oct 2010 22:57:25 +0900
branchstable
changeset 844 e5e1c16fe5b7
parent 843 55e4ea6d1c01
child 845 42c5129e9c66
child 847 1a00e2718cde
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. [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Fri Oct 15 00:36:45 2010 +0200
+++ 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))):