diff options
| author | Martin Fischer <martin@push-f.com> | 2023-09-01 13:27:46 +0200 | 
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 | 
| commit | 6556106154d7e7cbc7820f223b9baaf49a900449 (patch) | |
| tree | 1778db5ce2665aa49afb68041f53b6ee07149916 /tests | |
| parent | 0581e619867bde2374376265b24169b404187529 (diff) | |
fix!: make set_self_closing encoding-independent
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_spans.rs | 19 | 
1 files changed, 2 insertions, 17 deletions
| 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)  } | 
