Patchwork D1959: testrunner: on error, color the "(case xxx)" part the same as filename

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 8:44 p.m.
Message ID <f116c2d61981ee1bde0c9c85311f5bca@localhost.localdomain>
Download mbox | patch
Permalink /patch/27146/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 8:44 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG81c3ad368574: testrunner: on error, color the &quot;(case xxx)&quot; part the same as filename (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1959?vs=5033&id=5077

REVISION DETAIL
  https://phab.mercurial-scm.org/D1959

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -120,18 +120,19 @@ 
         }
 
     class TestRunnerLexer(lexer.RegexLexer):
+        testpattern = r'[\w-]+\.(t|py)( \(case [\w-]+\))?'
         tokens = {
             'root': [
                 (r'^Skipped', token.Generic.Skipped, 'skipped'),
                 (r'^Failed ', token.Generic.Failed, 'failed'),
                 (r'^ERROR: ', token.Generic.Failed, 'failed'),
             ],
             'skipped': [
-                (r'[\w-]+\.(t|py)', token.Generic.SName),
+                (testpattern, token.Generic.SName),
                 (r':.*', token.Generic.Skipped),
             ],
             'failed': [
-                (r'[\w-]+\.(t|py)', token.Generic.FName),
+                (testpattern, token.Generic.FName),
                 (r'(:| ).*', token.Generic.Failed),
             ]
         }