tests/run-tests.py
changeset 17778 80fe64581f3a
parent 17777 af7c6bc48d8d
child 17800 f3c36faa7374
--- a/tests/run-tests.py	Mon Oct 15 02:33:12 2012 +0200
+++ b/tests/run-tests.py	Sun Oct 14 18:30:42 2012 +0200
@@ -526,14 +526,14 @@
 def linematch(el, l):
     if el == l: # perfect match (fast)
         return True
-    if (el and
-        (el.endswith(" (re)\n") and rematch(el[:-6], l) or
-         el.endswith(" (glob)\n") and globmatch(el[:-8], l) or
-         el.endswith(" (esc)\n") and
-             (el[:-7].decode('string-escape') + '\n' == l or
-              os.name == 'nt' and
-              el[:-7].decode('string-escape') + '\n' == l))):
-        return True
+    if el:
+        if el.endswith(" (esc)\n"):
+            el = el[:-7].decode('string-escape') + '\n'
+        if el == l or os.name == 'nt' and el[:-1] + '\r\n' == l:
+            return True
+        if (el.endswith(" (re)\n") and rematch(el[:-6], l) or
+            el.endswith(" (glob)\n") and globmatch(el[:-8], l)):
+            return True
     return False
 
 def tsttest(test, wd, options, replacements):