From 6556106154d7e7cbc7820f223b9baaf49a900449 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 1 Sep 2023 13:27:46 +0200 Subject: fix!: make set_self_closing encoding-independent --- tests/test_spans.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/test_spans.rs b/tests/test_spans.rs index cb3ee18..74724a5 100644 --- a/tests/test_spans.rs +++ b/tests/test_spans.rs @@ -326,8 +326,6 @@ fn annotate_errors(html: &'static str) -> String { } } - let doesnt_support_utf16 = std::sync::Mutex::new(false); - let labeler = |tokens| { let mut labels = Vec::new(); for token in tokens { @@ -336,25 +334,12 @@ fn annotate_errors(html: &'static str) -> String { }; labels.push((span, error.code())); - - use html5tokenizer::Error; - - *doesnt_support_utf16.lock().unwrap() = matches!( - error, - | Error::EndTagWithTrailingSolidus // FIXME - ); } labels }; - // This will be removed once all tested errors support UTF-16. - let _ = labeler(Box::new(tokenizer(html)) as TokenIter); - if *doesnt_support_utf16.lock().unwrap() { - assert_panics_but_should_not(|| assert_char_encoding_independence(html, labeler)); - } else { - // TODO: Move this assertion into test_and_annotate once all tests support it. - assert_char_encoding_independence(html, labeler); - } + // TODO: Move this assertion into test_and_annotate once all tests support it. + assert_char_encoding_independence(html, labeler); test_and_annotate(html, labeler) } -- cgit v1.2.3