tests: inform on Windows about unnecessary glob lines stable
authorSimon Heimberg <simohe@besonet.ch>
Mon, 15 Oct 2012 23:28:45 +0200
branchstable
changeset 1216 192cebcd59a0
parent 1215 62ff53b05730
child 1217 09f857c44abe
child 1218 d29df508e187
tests: inform on Windows about unnecessary glob lines When glob lines directly match on windows, "/" (and not "\") was output in the path on the line. No glob matching is necessary in this case. The test output will look like this (when 5 tests have passed and no 4 has an unnecessary glob): ... Info, unnecessary glob: info about some/thing (glob) .. [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Wed Feb 13 21:58:52 2013 +0100
+++ b/tests/run-tests.py	Mon Oct 15 23:28:45 2012 +0200
@@ -542,6 +542,11 @@
     # 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':
+            # matching on "/" is not needed for this line
+            iolock.acquire()
+            print "\nInfo, unnecessary glob: %s (glob)" % el
+            iolock.release()
         return True
     i, n = 0, len(el)
     res = ''