Commit c0be1cae authored by Asitha Senanayake's avatar Asitha Senanayake
Browse files

fix(#114): add 'Validator Process Error' for AGS3 like files

parent 2be5a57a
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -740,6 +740,8 @@ def check_file(filepath_or_buffer, standard_AGS4_dictionary=None, rename_duplica

            # Exit if ags3_like line is found
            if ('AGS Format Rule 3' in ags_errors) and ('AGS3' in ags_errors['AGS Format Rule 3'][0]['desc']):
                ags_errors = check.add_error_msg(ags_errors, 'Validator Process Error', '-', '',
                                                 'Validation terminated due to suspected AGS3 file. Please fix errors and try again.')
                ags_errors = check.add_meta_data(filepath_or_buffer, standard_AGS4_dictionary, ags_errors=ags_errors, encoding=encoding)
                return ags_errors

+1 −0
Original line number Diff line number Diff line
@@ -729,6 +729,7 @@ def test_rule_AGS3():

    assert 'AGS Format Rule 3' in error_list.keys()
    assert 'AGS3' in error_list['AGS Format Rule 3'][0]['desc']
    assert 'Validator Process Error' in error_list.keys()


def test_file_with_BOM():