srctree

Robin Linden parent 555f568d 2838e94e
html2/test: Filter out tests that need the input to be unescaped twice

After this, all remaining domjs.test-tests pass, but all tests inunicodeCharsProblematic.test get filtered.

inlinesplit
html2/BUILD added: 11, removed: 4, total 7
@@ -72,7 +72,7 @@ extra_deps = {
],
) for test in [
# "@html5lib-tests//:tokenizer/contentModelFlags.test",
# "@html5lib-tests//:tokenizer/domjs.test",
"@html5lib-tests//:tokenizer/domjs.test",
"@html5lib-tests//:tokenizer/entities.test",
# "@html5lib-tests//:tokenizer/escapeFlag.test",
"@html5lib-tests//:tokenizer/namedEntities.test",
@@ -83,7 +83,7 @@ extra_deps = {
"@html5lib-tests//:tokenizer/test3.test",
"@html5lib-tests//:tokenizer/test4.test",
"@html5lib-tests//:tokenizer/unicodeChars.test",
"@html5lib-tests//:tokenizer/unicodeCharsProblematic.test",
# "@html5lib-tests//:tokenizer/unicodeCharsProblematic.test",
]]
 
[cc_fuzz_test(
 
html2/html5lib_test.cpp added: 11, removed: 4, total 7
@@ -142,10 +142,17 @@ int main(int argc, char **argv) {
auto tests = doc.find_field("tests").get_array().value();
for (auto test : tests) {
auto name = test["description"].get_string().value();
 
// TOOD(robinlinden): Don't skip these.
if (test["doubleEscaped"].error() == simdjson::SUCCESS) {
continue;
}
 
// TOOD(robinlinden): Don't skip these.
if (test["initialStates"].error() == simdjson::SUCCESS) {
continue;
}
 
auto in = test["input"].get_string().value();
// TOOD(robinlinden): Don't skip these.
// See: https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream