summaryrefslogtreecommitdiff
path: root/tests/it_url.t
diff options
context:
space:
mode:
authorChristian A. Weber2016-04-05 17:16:43 +0200
committerChristian A. Weber2016-04-05 17:16:43 +0200
commit668518af564e946a42f6d1c72421641ec0812a9b (patch)
tree8d8c5b33bcb22cb741b952a86d131884b255d29c /tests/it_url.t
parent81c322a85054fcdbec7839867578dbbc6d83cdb2 (diff)
downloaditools-668518af564e946a42f6d1c72421641ec0812a9b.tar.gz
itools-668518af564e946a42f6d1c72421641ec0812a9b.tar.bz2
itools-668518af564e946a42f6d1c72421641ec0812a9b.zip
add punycode test case
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-xtests/it_url.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index 5cb2b29..b6569b1 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -63,6 +63,14 @@ is(
'$url->path'
);
+# punycode test
+$url = new it_url('http://www.sörtsch.ch/?q=ültra#sörtsch');
+is(
+ $url->realhostname,
+ 'www.xn--srtsch-wxa.ch',
+ 'punycode $url->realhostname'
+);
+
$_SERVER['HTTP_HOST'] = "gna.ch";
is(
it_url::absolute("/"),