# HG changeset patch # User Martin von Zweigbergk # Date 1517501831 28800 # Node ID 8a7140ec4c89500e18626a4dd72b4344f335f89c # Parent fd21b87e59b26e685ed0e9aea6ae256a34f83f18 testrunner: on error, color the "(case xxx)" part the same as filename When using #testcases, the lines that read something like ERROR: test-split.t (case obsstore-off) output changed get colored red and the filename gets highlighted with a brighter red. This makes it harder to notice the "case obsstore-off" part, but it does seem important, so let's highlight it. Differential Revision: https://phab.mercurial-scm.org/D1959 diff -r fd21b87e59b2 -r 8a7140ec4c89 tests/run-tests.py --- a/tests/run-tests.py Thu Jan 18 10:08:23 2018 -0500 +++ b/tests/run-tests.py Thu Feb 01 08:17:11 2018 -0800 @@ -120,6 +120,7 @@ } class TestRunnerLexer(lexer.RegexLexer): + testpattern = r'[\w-]+\.(t|py)( \(case [\w-]+\))?' tokens = { 'root': [ (r'^Skipped', token.Generic.Skipped, 'skipped'), @@ -127,11 +128,11 @@ (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), ] }