From 668518af564e946a42f6d1c72421641ec0812a9b Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Tue, 5 Apr 2016 17:16:43 +0200 Subject: add punycode test case --- tests/it_url.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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("/"), -- cgit v1.2.3