summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUrban Müller2012-04-24 14:18:21 +0000
committerUrban Müller2012-04-24 14:18:21 +0000
commit9c523156bbc9d34ff2a16ec3b2c345951fc55287 (patch)
treeb03409e32574aaa76f78aef8158030d6a8cea5d8 /tests
parent177de5290677a71fe95e5264f1f21fad9cc7c469 (diff)
downloaditools-9c523156bbc9d34ff2a16ec3b2c345951fc55287.tar.gz
itools-9c523156bbc9d34ff2a16ec3b2c345951fc55287.tar.bz2
itools-9c523156bbc9d34ff2a16ec3b2c345951fc55287.zip
merged it_html::fix_encoding in it::any2utf8
Diffstat (limited to 'tests')
-rwxr-xr-xtests/it.t8
-rwxr-xr-xtests/it_html.t11
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/it.t b/tests/it.t
index 26a4e25..68ea398 100755
--- a/tests/it.t
+++ b/tests/it.t
@@ -371,4 +371,12 @@ is(it::any2utf8(
is(it::any2utf8(utf8_encode("ü")), "ü", "it::any2utf8 double encoding");
+is(it::any2utf8("Meier"), "Meier", "it::any2utf8 ascii");
+is(it::any2utf8("Müller"), "Müller", "it::any2utf8 utf-8 latin1");
+is(it::any2utf8("Aslı"), "Aslı", "it::any2utf8 utf-8 non-latin1");
+is(it::any2utf8("é»"), "é»", "it::any2utf8 utf-8 latin1 special combination");
+is(it::any2utf8(utf8_encode("Müller")), "Müller", "it::any2utf8 double encoded latin1");
+is(it::any2utf8(utf8_decode("Müller")), "Müller", "it::any2utf8 incorrectly encoded latin1");
+is(it::any2utf8("a💚b"), "a💚b", "it::any2utf8 correctly handles 4-byte utf-8 character GREEN HEART");
+
?>
diff --git a/tests/it_html.t b/tests/it_html.t
index 3ac69f6..307bc7f 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -170,16 +170,5 @@ is(it_html::entity_decode("’"), "'", "it_html::entity_decode numeric decim
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", "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", "it_html::fix_encoding double encoded 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", "it_html::fix_encoding incorrectly encoded latin1");
-
-is(it_html::fix_encoding("a💚b"), "a💚b", "it_html::fix_encoding correctly handles 4-byte utf-8 character GREEN HEART");
?>