Skip to content

Commit

Permalink
test Text.check: add a space at the start in character reference cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 11, 2024
1 parent 7040440 commit ddea83f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_text_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ def test_character_reference_decimal_garbage_at_the_end
assert_check_failed("&#48x;", "&")
end

def test_character_reference_decimal_space_at_the_start
# U+0030 DIGIT ZERO
assert_check_failed("&# 48;", "&")
end

def test_character_reference_decimal_control_character
# U+0008 BACKSPACE
assert_check_failed("", "")
Expand All @@ -92,6 +97,11 @@ def test_character_reference_hex_garbage_at_the_end
assert_check_failed("&#x48x;", "&")
end

def test_character_reference_hex_space_at_the_start
# U+0030 DIGIT ZERO
assert_check_failed("&#x 30;", "&")
end

def test_character_reference_hex_surrogate_block
# U+0D800 SURROGATE PAIR
assert_check_failed("�", "�")
Expand Down

0 comments on commit ddea83f

Please sign in to comment.