generate_expected_output.py: placate FutureWarning from python

Regexes have long specified that a [ as the first character inside a
[...] is just a literal [, but apparently we need to escape it now, to
avoid a "nested set" FutureWarning.

Change-Id: I76a48c9aafb0684a1d6b0d5284fe9852c9ea0e43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
Edward Welbourne 2019-01-30 12:02:27 +01:00
parent fcba9fa861
commit 7dd41b3267

View File

@ -132,7 +132,7 @@ class Cleaner (object):
# Add path to specific sources and to tst_*.cpp if missing (for in-source builds):
patterns += ((r'(^|[^/])\b(qtestcase.cpp)\b', r'\1qtbase/src/testlib/\2'),
# Add more special cases here, if they show up !
(r'([[" ])\.\./(counting/tst_counting.cpp)\b',
(r'([\[" ])\.\./(counting/tst_counting.cpp)\b',
r'\1' + os.path.sep.join(hereNames + (r'\2',))),
# The common pattern:
(r'(^|[^/])\b(tst_)?([a-z]+\d*)\.cpp\b',