aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-01 23:00:45 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commitf588704c90f33fe27945d742762d016dea3e113c (patch)
tree66716b8c01499f6b3848790c2185c9e06e48fb1e /tests
parentfb3d757b2f756950c9a86681291e2817e4bd2975 (diff)
fix: don't assume UTF-8 in machine/tokenizer
Diffstat (limited to 'tests')
-rw-r--r--tests/test_spans.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index c58616d..8190f01 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -73,7 +73,7 @@ fn start_tag_span() {
}
labels
};
- assert_panics_but_should_not(|| assert_char_encoding_independence(html, labeler)); // FIXME
+ assert_char_encoding_independence(html, labeler);
assert_snapshot!(test_and_annotate(html, labeler), @r###"
<x> <xyz> <xyz > <xyz/>
^^^ ^^^^^ ^^^^^^^ ^^^^^^
@@ -92,7 +92,7 @@ fn end_tag_span() {
}
labels
};
- assert_panics_but_should_not(|| assert_char_encoding_independence(html, labeler)); // FIXME
+ assert_char_encoding_independence(html, labeler);
assert_snapshot!(test_and_annotate(html, labeler), @r###"
</x> </xyz> </xyz > </xyz/>
^^^^ ^^^^^^ ^^^^^^^^ ^^^^^^^
@@ -170,7 +170,7 @@ fn attribute_value_span() {
}
labels
};
- assert_panics_but_should_not(|| assert_char_encoding_independence(html, labeler)); // FIXME
+ assert_char_encoding_independence(html, labeler);
assert_snapshot!(test_and_annotate(html, labeler), @r###"
<test x=unquoted y = unquoted z='single-quoted' zz="double-quoted" empty=''>
^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^
@@ -190,7 +190,7 @@ fn attribute_value_with_char_ref() {
}
labels
};
- assert_panics_but_should_not(|| assert_char_encoding_independence(html, labeler)); // FIXME
+ assert_char_encoding_independence(html, labeler);
assert_snapshot!(test_and_annotate(html, labeler), @r###"
<test x=&amp; y='&amp;' z="&amp;">
^^^^^ ^^^^^ ^^^^^
@@ -261,7 +261,7 @@ fn doctype_span() {
};
vec![(doctype.span, "")]
};
- assert_panics_but_should_not(|| assert_char_encoding_independence(case, labeler)); // FIXME
+ assert_char_encoding_independence(case, labeler);
annotated.push_str(&test_and_annotate(case, labeler));
}
@@ -341,17 +341,9 @@ fn annotate_errors(html: &'static str) -> String {
*doesnt_support_utf16.lock().unwrap() = matches!(
error,
- | Error::AbsenceOfDigitsInNumericCharacterReference // FIXME
- | Error::CharacterReferenceOutsideUnicodeRange // FIXME
- | Error::ControlCharacterReference // FIXME
| Error::DuplicateAttribute // FIXME
| Error::EndTagWithAttributes // FIXME
| Error::EndTagWithTrailingSolidus // FIXME
- | Error::InvalidFirstCharacterOfTagName // FIXME
- | Error::NoncharacterCharacterReference // FIXME
- | Error::NullCharacterReference // FIXME
- | Error::SurrogateCharacterReference // FIXME
- | Error::UnknownNamedCharacterReference // FIXME
);
}
labels