mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Add simple named character reference test to TestHTMLTokenizer
This commit is contained in:
parent
7096a2892e
commit
1fd0bf9feb
Notes:
github-actions[bot]
2025-07-04 09:58:36 +00:00
Author: https://github.com/squeek502
Commit: 1fd0bf9feb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5296
Reviewed-by: https://github.com/gmta ✅
1 changed files with 13 additions and 0 deletions
|
@ -199,6 +199,19 @@ TEST_CASE(character_reference_in_attribute)
|
|||
END_ENUMERATION();
|
||||
}
|
||||
|
||||
TEST_CASE(named_character_reference)
|
||||
{
|
||||
auto tokens = run_tokenizer("⋶¬it;&cz"sv);
|
||||
BEGIN_ENUMERATION(tokens);
|
||||
EXPECT_CHARACTER_TOKEN(0x22F6); // ⋶
|
||||
EXPECT_CHARACTER_TOKEN(0xAC); // ¬ (backtracked from ¬it)
|
||||
EXPECT_CHARACTER_TOKENS(it);
|
||||
EXPECT_CHARACTER_TOKEN(';');
|
||||
EXPECT_CHARACTER_TOKENS(&cz); // invalid
|
||||
EXPECT_END_OF_FILE_TOKEN();
|
||||
END_ENUMERATION();
|
||||
}
|
||||
|
||||
TEST_CASE(numeric_character_reference)
|
||||
{
|
||||
auto tokens = run_tokenizer("ї"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue