diff --git a/tools/extracttests.py b/tools/extracttests.py index f64b4db18..4f90aefda 100755 --- a/tools/extracttests.py +++ b/tools/extracttests.py @@ -253,13 +253,10 @@ if filename != None: fout.close() # write 'expected' to errors.txt - expected = expected.replace('\\n', '\n') - expected = expected.replace('\\"', '"') - if expected.startswith('[test.cpp:'): - expected='['+filename+expected[9:] - elif expected.startswith('[test.c:'): - expected='['+filename+expected[8:] if expected != '': + expected = expected.replace('\\n', '\n') + expected = expected.replace('\\"', '"') + expected = re.sub('\\[test.cp?p?:', '['+filename+':', expected) errors.write(expected) errors.close() else: