changeset 19419:e823abe577a2

run-tests: test for os.altsep instead of os.name when checking \ for / This tells more explicitly what it is about
author Simon Heimberg <simohe@besonet.ch>
date Sat, 13 Jul 2013 23:57:55 +0200
parents 55b9d98a1ef4
children 4f32747879d1
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Jul 15 01:05:42 2013 +0400
+++ b/tests/run-tests.py	Sat Jul 13 23:57:55 2013 +0200
@@ -605,7 +605,7 @@
     # The only supported special characters are * and ? plus / which also
     # matches \ on windows. Escaping of these caracters is supported.
     if el + '\n' == l:
-        if os.name == 'nt':
+        if os.altsep:
             # matching on "/" is not needed for this line
             log("\nInfo, unnecessary glob: %s (glob)" % el)
         return True
@@ -621,7 +621,7 @@
             res += '.*'
         elif c == '?':
             res += '.'
-        elif c == '/' and os.name == 'nt':
+        elif c == '/' and os.altsep:
             res += '[/\\\\]'
         else:
             res += re.escape(c)