Mercurial > hg
diff tests/run-tests.py @ 38223:b865bba56db1
run-tests: update the test case name format
Manually typing parenthesis and spaces will be tedious when trying to launch a
specific test case.
I'm proposing a simpler format that is less hard to remember and type right.
There was other possibilities envisaged like `::` or `!`, I think `#` is
slight easier to type but I'm open to any suggestion on the new format.
Differential Revision: https://phab.mercurial-scm.org/D3556
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sun, 13 May 2018 23:18:26 +0200 |
parents | 507bdc40bb17 |
children | f2e3196a34f9 |
line wrap: on
line diff
--- a/tests/run-tests.py Thu Apr 26 23:57:20 2018 +0200 +++ b/tests/run-tests.py Sun May 13 23:18:26 2018 +0200 @@ -120,7 +120,7 @@ } class TestRunnerLexer(lexer.RegexLexer): - testpattern = r'[\w-]+\.(t|py)( \(case [\w-]+\))?' + testpattern = r'[\w-]+\.(t|py)(#[\w-]+)?' tokens = { 'root': [ (r'^Skipped', token.Generic.Skipped, 'skipped'), @@ -1247,7 +1247,7 @@ self._allcases = parsettestcases(path) super(TTest, self).__init__(path, *args, **kwds) if case: - self.name = '%s (case %s)' % (self.name, _strpath(case)) + self.name = '%s#%s' % (self.name, _strpath(case)) self.errpath = b'%s.%s.err' % (self.errpath[:-4], case) self._tmpname += b'-%s' % case self._have = {} @@ -2646,7 +2646,7 @@ expanded_args.append(arg) args = expanded_args - testcasepattern = re.compile(r'([\w-]+\.t|py)( \(case ([\w-])+\))') + testcasepattern = re.compile(r'([\w-]+\.t|py)(#([\w-])+)') tests = [] for t in args: case = None