From bbcc6615dc5316a73f07b262950ac18d50c80497 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 26 Mar 2012 15:16:01 +0000 Subject: Improve it_html tests --- tests/it_html.t | 22 +++++++++++----------- 1 file 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"); ?> -- cgit v1.2.3