Skip to content

Commit ca9dbfc

Browse files
author
Daniel Marjamäki
committed
extracttests.py : improved errors.txt output
1 parent 0d48cd3 commit ca9dbfc

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

tools/extracttests.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,10 @@ def writeHtmlFile(nodes, functionName, filename, errorsOnly):
253253
fout.close()
254254

255255
# write 'expected' to errors.txt
256-
expected = expected.replace('\\n', '\n')
257-
expected = expected.replace('\\"', '"')
258-
if expected.startswith('[test.cpp:'):
259-
expected='['+filename+expected[9:]
260-
elif expected.startswith('[test.c:'):
261-
expected='['+filename+expected[8:]
262256
if expected != '':
257+
expected = expected.replace('\\n', '\n')
258+
expected = expected.replace('\\"', '"')
259+
expected = re.sub('\\[test.cp?p?:', '['+filename+':', expected)
263260
errors.write(expected)
264261
errors.close()
265262
else:

0 commit comments

Comments
 (0)