diff options
author | Christian Schneider | 2012-03-26 15:16:01 +0000 |
---|---|---|
committer | Christian Schneider | 2012-03-26 15:16:01 +0000 |
commit | bbcc6615dc5316a73f07b262950ac18d50c80497 (patch) | |
tree | 9cc889ea8b560a3b04398d385a14240263c40a69 | |
parent | b7200b739ff651a7647d2d666e3674a7fe3cb6e2 (diff) | |
download | itools-bbcc6615dc5316a73f07b262950ac18d50c80497.tar.gz itools-bbcc6615dc5316a73f07b262950ac18d50c80497.tar.bz2 itools-bbcc6615dc5316a73f07b262950ac18d50c80497.zip |
Improve it_html tests
-rwxr-xr-x | tests/it_html.t | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/it_html.t b/tests/it_html.t index a576b47..b1d271e 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -165,19 +165,19 @@ is( "q←x", 'it_html::sanitize preserve non-decodable numeric entities' ); -is(it_html::entity_decode("’"), "'"); -is(it_html::entity_decode("࿿"), " "); -is(it_html::entity_decode("ϧ"), " "); +is(it_html::entity_decode("’"), "'", "it_html::entity_decode numeric decimal entity"); +is(it_html::entity_decode("࿿"), " ", "it_html::entity_decode invalid numeric hex entity"); +is(it_html::entity_decode("ϧ"), " ", "it_html::entity_decode invalid numeric decimal entity"); -is(it_html::fix_encoding("Meier"), "Meier"); -is(it_html::fix_encoding("Müller"), "Müller"); -is(it_html::fix_encoding("Aslı"), "Aslı"); -is(it_html::fix_encoding("é»"), "é»"); +is(it_html::fix_encoding("Meier"), "Meier", "it_html::fix_encoding ascii"); +is(it_html::fix_encoding("Müller"), "Müller", "it_html::fix_encoding utf-8 latin1"); +is(it_html::fix_encoding("Aslı"), "Aslı", "it_html::fix_encoding utf-8 non-latin1"); +is(it_html::fix_encoding("é»"), "é»", "it_html::fix_encoding utf-8 latin1 special combination"); -is(it_html::fix_encoding(utf8_encode("Müller"), true), "Müller", "double encoded latin1"); # Double encoded latin1 -is(it_html::fix_encoding(utf8_encode("Aslı"), true), "Aslı"); # Double encoded non-latin1 -is(it_html::fix_encoding(utf8_encode("é»"), true), "é»"); # Double encoded special combination +is(it_html::fix_encoding(utf8_encode("Müller"), true), "Müller", "it_html::fix_encoding double encoded latin1"); +is(it_html::fix_encoding(utf8_encode("Aslı"), true), "Aslı", "it_html::fix_encoding double encoded non-latin1"); +is(it_html::fix_encoding(utf8_encode("é»"), true), "é»", "it_html::fix_encoding double encoded latin1 special combination"); -is(it_html::fix_encoding(utf8_decode("Müller"), true), "Müller"); # Incorrectly decoded latin1 +is(it_html::fix_encoding(utf8_decode("Müller"), true), "Müller", "it_html::fix_encoding incorrectly encoded latin1"); ?> |