File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,18 @@ def main():
9393 print_incorrect_match (match_idx + 1 , input_lines [input_idx ].strip (), "" );
9494 print_content (input_lines , match_lines , ignored_lines )
9595 sys .exit (1 )
96+ elif status == Status .INPUT_END :
97+ # If we get to the end of the input, but still have pending matches,
98+ # then that's a failure unless all pending matches are optional -
99+ # otherwise we're done
100+ while match_idx < len (match_lines ):
101+ if not (match_lines [match_idx ].startswith (Tag .OPT .value ) or
102+ match_lines [match_idx ].startswith (Tag .IGNORE .value )):
103+ print_incorrect_match (match_idx + 1 , "" , match_lines [match_idx ]);
104+ print_content (input_lines , match_lines , ignored_lines )
105+ sys .exit (1 )
106+ match_idx += 1
107+ sys .exit (0 )
96108
97109 input_line = input_lines [input_idx ].strip () if input_idx < len (input_lines ) else ""
98110 match_line = match_lines [match_idx ]
You can’t perform that action at this time.
0 commit comments