Skip to content

Commit 5f93af3

Browse files
committed
Fuzz input validators for spaces at end of lines
1 parent 94d37f3 commit 5f93af3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

problemtools/verifyproblem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ def _build_junk_modifier(
975975
_build_junk_modifier(
976976
'spaces added where there already is whitespace', r'\s', lambda m: m.group(0) + ' ' * random.randint(1, 5)
977977
),
978+
_build_junk_modifier('spaces added to the end of a line', r'\n', lambda m: m.group(0) + ' ' * random.randint(1, 5)),
978979
_build_junk_modifier('newlines added where there already are newlines', '\n', lambda m: '\n' * random.randint(2, 5)),
979980
_build_junk_modifier('leading zeros added to integers', r'(^|[^.]\b)([0-9]+)\b', r'\g<1>0000000000\g<2>'),
980981
_build_junk_modifier('trailing zeros added to real number decimal portion', r'\.[0-9]+\b', r'\g<0>0000000000'),

0 commit comments

Comments
 (0)