summaryrefslogtreecommitdiff
path: root/t/idna.t
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-07-25 01:06:42 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-07-25 01:06:42 +0000
commit9165b237ad8fae18b36d4d40d6e2ccfde7b136c7 (patch)
tree06530ddd6baa7e251c58b6b6729ed458da61a681 /t/idna.t
downloadURI-tarball-f55d0c723f9f4816be807e4b551fc5564d75954f.tar.gz
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";