Reject non-ASCII characters in test case descriptions

Don't require that all the tools we use to process test outcomes are
Unicode-clean.
This commit is contained in:
Gilles Peskine 2019-09-20 18:02:30 +02:00
parent f12ad58a1d
commit 57870e8c67

View file

@ -64,6 +64,9 @@ def check_description(results, seen, file_name, line_number, description):
results.error(file_name, line_number,
'Forbidden character \'{}\' in description',
re.search(br'[\t;]', description).group(0).decode('ascii'))
if re.search(br'[^ -~]', description):
results.error(file_name, line_number,
'Non-ASCII character in description')
if len(description) > 66:
results.warning(file_name, line_number,
'Test description too long ({} > 66)',