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%2Fpop.t;fp=dev%2Farm%2Fliburi-perl%2Fliburi-perl-1.35.dfsg.1%2Ft%2Fpop.t;h=a8d446f883bc0977d02a8fe39065e575b67fb7ec;hb=f477fa73365d491991707e7ed9217b48d6994551;hp=0000000000000000000000000000000000000000;hpb=da95c414033799c3a62606f299c3c00b5c77ca11;p=dh-make-perl diff --git a/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/pop.t b/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/pop.t new file mode 100644 index 0000000..a8d446f --- /dev/null +++ b/dev/arm/liburi-perl/liburi-perl-1.35.dfsg.1/t/pop.t @@ -0,0 +1,49 @@ +#!perl -w + +print "1..8\n"; + +use URI; + +$u = URI->new('pop://aas@pop.sn.no'); + +print "not " unless $u->user eq "aas" && + !defined($u->auth) && + $u->host eq "pop.sn.no" && + $u->port == 110 && + $u eq 'pop://aas@pop.sn.no'; +print "ok 1\n"; + +$u->auth("+APOP"); +print "not " unless $u->auth eq "+APOP" && + $u eq 'pop://aas;AUTH=+APOP@pop.sn.no'; +print "ok 2\n"; + +$u->user("gisle"); +print "not " unless $u->user eq "gisle" && + $u eq 'pop://gisle;AUTH=+APOP@pop.sn.no'; +print "ok 3\n"; + +$u->port(4000); +print "not " unless $u eq 'pop://gisle;AUTH=+APOP@pop.sn.no:4000'; +print "ok 4\n"; + +$u = URI->new("pop:"); +$u->host("pop.sn.no"); +$u->user("aas"); +$u->auth("*"); +print "not " unless $u eq 'pop://aas;AUTH=*@pop.sn.no'; +print "ok 5\n"; + +$u->auth(undef); +print "not " unless $u eq 'pop://aas@pop.sn.no'; +print "ok 6\n"; + +$u->user(undef); +print "not " unless $u eq 'pop://pop.sn.no'; +print "ok 7\n"; + +# Try some funny characters too +$u->user('får;k@l'); +print "not " unless $u->user eq 'får;k@l' && + $u eq 'pop://f%E5r%3Bk%40l@pop.sn.no'; +print "ok 8\n";