# HG changeset patch # User Teemu Piippo # Date 1561239754 -10800 # Node ID 831d9f81a48cda11cdd056f03c6812fab20e9f28 # Parent 9664583cd1c9bf9a9566e6b2b5b3e38a52dc37f1 added a test for ".dat"-extensions in the description diff -r 9664583cd1c9 -r 831d9f81a48c tests/misc.py --- a/tests/misc.py Sun Jun 23 00:38:01 2019 +0300 +++ b/tests/misc.py Sun Jun 23 00:42:34 2019 +0300 @@ -145,6 +145,20 @@ if is_line and element.colour.index != 24: yield report_problem('bad-colour-24-line', bad_object = element) +@problem_type('moved-to-with-extension', + severity = 'hold', + message = 'moved-to files must not contain the ' + '".dat"-extension in the description', +) +def moved_to_with_extension_test(model): + if model.header.valid \ + and model.header.description.startswith('~Moved to') \ + and '.dat' in model.header.description: + yield report_problem( + 'moved-to-with-extension', + bad_object = model.body[0], + ) + manifest = { 'tests': [ colours_test, @@ -156,5 +170,6 @@ header_bfc_test, keywords_tests, colour_24_test, + moved_to_with_extension_test, ], }