summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/it_url.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index b04618d..1117aff 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -63,4 +63,26 @@ is(
'$url->path'
);
+$_SERVER['HTTP_HOST'] = "gna.ch";
+is(
+ it_url::absolute("/"),
+ 'http://gna.ch:/',
+ 'it_url::absolute basic',
+);
+
+$_SERVER['SERVER_PORT'] = 42;
+is(
+ it_url::absolute("/port"),
+ 'http://gna.ch:42/port',
+ 'it_url::absolute with non-standard port',
+);
+
+$_SERVER['HTTPS'] = true;
+$_SERVER['SERVER_PORT'] = 443;
+is(
+ it_url::absolute("/https"),
+ 'https://gna.ch/https',
+ 'it_url::absolute for https',
+);
+
?>