diff tests/run-tests.py @ 23728:31d3f973d079

run-tests: automatically add (glob) to "saved backup bundle to" lines Avoid spending too much time adding (glob) after running run-tests -i. This doesn't handle all cases but it helps. The run-tests tests add a bit of escaping of trailing (glob) in the output to avoid interference from the outer test runner. The regexp for matching the output lines contains a group for making multiline substitute in a way that works with Python before 2.7.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 27 Nov 2014 02:04:30 +0100
parents 42ed0780ec4b
children 661b246bf1c4
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Jan 05 15:00:02 2015 -0800
+++ b/tests/run-tests.py	Thu Nov 27 02:04:30 2014 +0100
@@ -627,6 +627,8 @@
             (r':%s\b' % self._startport, ':$HGPORT'),
             (r':%s\b' % (self._startport + 1), ':$HGPORT1'),
             (r':%s\b' % (self._startport + 2), ':$HGPORT2'),
+            (r'(?m)^(saved backup bundle to .*\.hg)( \(glob\))?$',
+             r'\1 (glob)'),
             ]
 
         if os.name == 'nt':
@@ -1025,6 +1027,9 @@
             if el.endswith(" (re)\n"):
                 return TTest.rematch(el[:-6], l)
             if el.endswith(" (glob)\n"):
+                # ignore '(glob)' added to l by 'replacements'
+                if l.endswith(" (glob)\n"):
+                    l = l[:-8] + "\n"
                 return TTest.globmatch(el[:-8], l)
             if os.altsep and l.replace('\\', '/') == el:
                 return '+glob'