Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (15 sloc) 0.552 kb
#!/usr/bin/perl -w
use strict;
use warnings;
use Test;
plan tests => 6;
use URI;
my $uri;
$uri = URI->new("");
ok($uri->rel(""), "./");
ok($uri->rel("HTTP://WWW.EXAMPLE.COM/foo/bar/"), "./");
ok($uri->rel("HTTP://WWW.EXAMPLE.COM/FOO/BAR/"), "../../foo/bar/");
ok($uri->rel("HTTP://WWW.EXAMPLE.COM:80/foo/bar/"), "./");
$uri = URI->new("");
ok($uri->rel(""), "bar");
ok($uri->rel(""), "foo/bar");
Jump to Line
Something went wrong with that request. Please try again.