summaryrefslogtreecommitdiff
path: root/t/mms.t
diff options
context:
space:
mode:
Diffstat (limited to 't/mms.t')
-rw-r--r--t/mms.t38
1 files changed, 38 insertions, 0 deletions
diff --git a/t/mms.t b/t/mms.t
new file mode 100644
index 0000000..d3ac1d1
--- /dev/null
+++ b/t/mms.t
@@ -0,0 +1,38 @@
+use strict;
+use warnings;
+
+print "1..8\n";
+
+use URI;
+
+my $u = URI->new("<mms://66.250.188.13/KFOG_FM>");
+
+#print "$u\n";
+print "not " unless $u eq "mms://66.250.188.13/KFOG_FM";
+print "ok 1\n";
+
+print "not " unless $u->port == 1755;
+print "ok 2\n";
+
+# play with port
+my $old = $u->port(8755);
+print "not " unless $old == 1755 && $u eq "mms://66.250.188.13:8755/KFOG_FM";
+print "ok 3\n";
+
+$u->port(1755);
+print "not " unless $u eq "mms://66.250.188.13:1755/KFOG_FM";
+print "ok 4\n";
+
+$u->port("");
+print "not " unless $u eq "mms://66.250.188.13:/KFOG_FM" && $u->port == 1755;
+print "ok 5\n";
+
+$u->port(undef);
+print "not " unless $u eq "mms://66.250.188.13/KFOG_FM";
+print "ok 6\n";
+
+print "not " unless $u->host eq "66.250.188.13";
+print "ok 7\n";
+
+print "not " unless $u->path eq "/KFOG_FM";
+print "ok 8\n";