| 61 |
${dir_name}test4.test |
${dir_name}test4.test |
| 62 |
${dir_name}contentModelFlags.test |
${dir_name}contentModelFlags.test |
| 63 |
${dir_name}escapeFlag.test |
${dir_name}escapeFlag.test |
| 64 |
|
${dir_name}entities.test |
| 65 |
|
${dir_name}xmlViolation.test |
| 66 |
${test_dir_name}tokenizer-test-1.test |
${test_dir_name}tokenizer-test-1.test |
| 67 |
]) { |
]) { |
| 68 |
open my $file, '<', $file_name |
open my $file, '<', $file_name |
| 82 |
$c += ((((hex $1) & 0b1111111111) << 10) | ((hex $2) & 0b1111111111)); |
$c += ((((hex $1) & 0b1111111111) << 10) | ((hex $2) & 0b1111111111)); |
| 83 |
chr $c; |
chr $c; |
| 84 |
}gex; |
}gex; |
| 85 |
my $tests = jsonToObj ($js)->{tests}; |
my $json = jsonToObj ($js); |
| 86 |
|
my $tests = $json->{tests} || $json->{xmlViolationTests}; |
| 87 |
TEST: for my $test (@$tests) { |
TEST: for my $test (@$tests) { |
| 88 |
my $s = $test->{input}; |
my $s = $test->{input}; |
| 89 |
|
|
| 159 |
$test_token->[1] = $token->{data} if defined $token->{data}; |
$test_token->[1] = $token->{data} if defined $token->{data}; |
| 160 |
if ($token->{type} == Whatpm::HTML::START_TAG_TOKEN ()) { |
if ($token->{type} == Whatpm::HTML::START_TAG_TOKEN ()) { |
| 161 |
$test_token->[2] = {map {$_->{name} => $_->{value}} values %{$token->{attributes}}}; |
$test_token->[2] = {map {$_->{name} => $_->{value}} values %{$token->{attributes}}}; |
| 162 |
|
if ({ |
| 163 |
|
## NOTE: Permitted slash |
| 164 |
|
br => 1, link => 1, |
| 165 |
|
}->{$token->{tag_name}}) { |
| 166 |
|
delete $p->{self_closing}; |
| 167 |
|
} |
| 168 |
} elsif ($token->{type} == Whatpm::HTML::DOCTYPE_TOKEN ()) { |
} elsif ($token->{type} == Whatpm::HTML::DOCTYPE_TOKEN ()) { |
| 169 |
$test_token->[1] = $token->{name}; |
$test_token->[1] = $token->{name}; |
| 170 |
$test_token->[2] = $token->{public_identifier}; |
$test_token->[2] = $token->{public_identifier}; |