[PATCH 02 of 11 STABLE] tests: add "(glob)" to paths in test-run-tests.t for Windows

Mads Kiilerich mads at kiilerich.com
Mon Oct 20 08:54:25 CDT 2014


On 10/20/2014 03:26 PM, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1413810488 -32400
> #      Mon Oct 20 22:08:08 2014 +0900
> # Branch stable
> # Node ID 8ffac97b85a5b2888f67e9b9a4d0cada7171fc76
> # Parent  ef382dbe8c20ee19e984ed26c8c46f93e50bf229
> tests: add "(glob)" to paths in test-run-tests.t for Windows

So much tedious work. How about something like

--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -600,7 +600,8 @@ class Test(unittest.TestCase):
              r.append(
                  (''.join(c.isalpha() and '[%s%s]' % (c.lower(), 
c.upper()) or
                      c in '/\\' and r'[/\\]' or c.isdigit() and c or 
'\\' + c
-                    for c in self._testtmp), '$TESTTMP'))
+                    for c in self._testtmp) + '([-._/a-zA-Z0-9]*)',
+                 lambda m: '$TESTTMP' + m.group(1).replace('\\', '/')))
          else:
              r.append((re.escape(self._testtmp), '$TESTTMP'))

?

/Mads


More information about the Mercurial-devel mailing list