summaryrefslogtreecommitdiff
path: root/t/idna.t
diff options
context:
space:
mode:
Diffstat (limited to 't/idna.t')
-rw-r--r--t/idna.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/idna.t b/t/idna.t
new file mode 100644
index 0000000..da2ad98
--- /dev/null
+++ b/t/idna.t
@@ -0,0 +1,14 @@
+use strict;
+use warnings;
+
+use utf8;
+use Test::More tests => 7;
+use URI::_idna;
+
+is URI::_idna::encode("www.example.com"), "www.example.com";
+is URI::_idna::decode("www.example.com"), "www.example.com";
+is URI::_idna::encode("www.example.com."), "www.example.com.";
+is URI::_idna::decode("www.example.com."), "www.example.com.";
+is URI::_idna::encode("Bücher.ch"), "xn--bcher-kva.ch";
+is URI::_idna::decode("xn--bcher-kva.ch"), "bücher.ch";
+is URI::_idna::decode("xn--bcher-KVA.ch"), "bücher.ch";