Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / liburi-perl / liburi-perl-1.35.dfsg.1 / t / rel.t
diff --git a/dev/i386/liburi-perl/liburi-perl-1.35.dfsg.1/t/rel.t b/dev/i386/liburi-perl/liburi-perl-1.35.dfsg.1/t/rel.t
new file mode 100644 (file)
index 0000000..8115511
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+print "1..4\n";
+
+use strict;
+use URI;
+
+my $uri = URI->new("http://www.example.com/foo/bar/");
+
+print "not " unless $uri->rel("http://www.example.com/foo/bar/") eq "./";
+print "ok 1\n";
+
+print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/foo/bar/") eq "./";
+print "ok 2\n";
+
+print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/FOO/BAR/") eq "../../foo/bar/";
+print "ok 3\n";
+
+print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM:80/foo/bar/") eq "./";
+print "ok 4\n";
+