extracttests.py : improved errors.txt output

This commit is contained in:
Daniel Marjamäki 2011-11-29 21:35:57 +01:00
parent 0d48cd390b
commit ca9dbfc031
1 changed files with 3 additions and 6 deletions

View File

@ -253,13 +253,10 @@ if filename != None:
fout.close() fout.close()
# write 'expected' to errors.txt # write 'expected' to errors.txt
if expected != '':
expected = expected.replace('\\n', '\n') expected = expected.replace('\\n', '\n')
expected = expected.replace('\\"', '"') expected = expected.replace('\\"', '"')
if expected.startswith('[test.cpp:'): expected = re.sub('\\[test.cp?p?:', '['+filename+':', expected)
expected='['+filename+expected[9:]
elif expected.startswith('[test.c:'):
expected='['+filename+expected[8:]
if expected != '':
errors.write(expected) errors.write(expected)
errors.close() errors.close()
else: else: