tests/run-tests.py
branchstable
changeset 1015 0a583943b4b4
parent 1009 0c737b00568d
child 1016 b4ca7adb4bf1
--- a/tests/run-tests.py	Mon Nov 07 03:24:53 2011 +0100
+++ b/tests/run-tests.py	Mon Nov 07 03:25:10 2011 +0100
@@ -530,20 +530,22 @@
         return False
 
 def globmatch(el, l):
-    # The only supported special characters are * and ?. Escaping is
-    # supported.
+    # The only supported special characters are * and ? plus / which also
+    # matches \ on windows. Escaping of these caracters is supported.
     i, n = 0, len(el)
     res = ''
     while i < n:
         c = el[i]
         i += 1
-        if c == '\\' and el[i] in '*?\\':
+        if c == '\\' and el[i] in '*?\\/':
             res += el[i - 1:i + 1]
             i += 1
         elif c == '*':
             res += '.*'
         elif c == '?':
             res += '.'
+        elif c == '/' and os.name == 'nt':
+            res += '[/\\\\]'
         else:
             res += re.escape(c)
     return rematch(res, l)