X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=dev%2Farm%2Fliburi-perl%2Fliburi-perl-1.35.dfsg.1%2Ft%2Frtsp.t;fp=dev%2Farm%2Fliburi-perl%2Fliburi-perl-1.35.dfsg.1%2Ft%2Frtsp.t;h=c1eb342fa2971d1a1d72660abf9c305413b23f2f;hb=f477fa73365d491991707e7ed9217b48d6994551;hp=0000000000000000000000000000000000000000;hpb=da95c414033799c3a62606f299c3c00b5c77ca11;p=dh-make-perl diff --git a/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/rtsp.t b/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/rtsp.t new file mode 100644 index 0000000..c1eb342 --- /dev/null +++ b/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/rtsp.t @@ -0,0 +1,42 @@ +#!perl -w + +print "1..9\n"; + +use URI; + +$u = URI->new(""); + +#print "$u\n"; +print "not " unless $u eq "rtsp://media.perl.com/f%F4o.smi/"; +print "ok 1\n"; + +print "not " unless $u->port == 554; +print "ok 2\n"; + +# play with port +$old = $u->port(8554); +print "not " unless $old == 554 && $u eq "rtsp://media.perl.com:8554/f%F4o.smi/"; +print "ok 3\n"; + +$u->port(554); +print "not " unless $u eq "rtsp://media.perl.com:554/f%F4o.smi/"; +print "ok 4\n"; + +$u->port(""); +print "not " unless $u eq "rtsp://media.perl.com:/f%F4o.smi/" && $u->port == 554; +print "ok 5\n"; + +$u->port(undef); +print "not " unless $u eq "rtsp://media.perl.com/f%F4o.smi/"; +print "ok 6\n"; + +print "not " unless $u->host eq "media.perl.com"; +print "ok 7\n"; + +print "not " unless $u->path eq "/f%F4o.smi/"; +print "ok 8\n"; + +$u->scheme("rtspu"); +print "not " unless $u->scheme eq "rtspu"; +print "ok 9\n"; +