// AUTOGENERATED FILE mod test_utils; mod tests { use insta::{assert_debug_snapshot, with_settings}; use crate::test_utils::*; // Spec valid tests #[test] fn doctype_with_publicid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn doctype_with_systemid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn doctype_with_single_hyphen_quoted_systemid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn doctype_with_publicid_and_systemid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn hexadecimal_entity_with_mixed_uppercase_and_lowercase() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"ꯍ"####)); }); } #[test] fn entity_without_a_name() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"&;"####)); }); } #[test] fn unescaped_ampersand_in_attribute_value() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn starttag_containing_lt() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn non_hyphen_void_element_containing_trailing() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn void_element_with_permitted_slash() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"
"####)); }); } #[test] fn void_element_with_permitted_slash_with_attribute() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"
"####)); }); } #[test] fn double_hyphen_quoted_attribute_value() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn entity_plus_newline() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####" x > "####)); }); } #[test] fn start_tag_with_no_attributes_but_space_before_the_greater_hyphen_than_sign() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn empty_attribute_followed_by_uppercase_attribute() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } // Spec error tests #[test] fn doctype_without_name() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn doctype_without_space_before_name() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn incorrect_doctype_without_a_space_before_name() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn doctype_with_eof_after_public() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"true}, { assert_debug_snapshot!(parser_test(r####"true}, { assert_debug_snapshot!(parser_test(r####"true}, { assert_debug_snapshot!(parser_test(r####"x"####)); }); } #[test] fn doctype_with_gt_in_single_hyphen_quoted_publicid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"x"####)); }); } #[test] fn doctype_with_gt_in_double_hyphen_quoted_systemid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"x"####)); }); } #[test] fn doctype_with_gt_in_single_hyphen_quoted_systemid() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"x"####)); }); } #[test] fn incomplete_doctype() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"true}, { assert_debug_snapshot!(parser_test(r####"�"####)); }); } #[test] fn hexadecimal_entity_representing_the_nul_character() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"�"####)); }); } #[test] fn numeric_entity_representing_a_codepoint_after_1114111_u_plus_10ffff() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"�"####)); }); } #[test] fn hexadecimal_entity_representing_a_codepoint_after_1114111_u_plus_10ffff() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"�"####)); }); } #[test] fn hexadecimal_entity_pair_representing_a_surrogate_pair() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"��"####)); }); } #[test] fn starttag_containing() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn unescaped_lt() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn simili_processing_instruction() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn a_bogus_comment_stops_at_gt_comma_even_if_preceded_by_two_dashes() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn unescaped_lt_gen_1() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"foo < bar"####)); }); } #[test] fn null_byte_replacement() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####""####)); }); } #[test] fn comment_with_dash() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"c"####)); }); } #[test] fn empty_end_tag_with_following_end_tag() { with_settings!({sort_maps =>true}, { assert_debug_snapshot!(parser_test(r####"ac"####)); }); } }