X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=deb-src%2Flibwww-perl%2Flibwww-perl-5.813%2Ft%2Flive%2Fhttps.t;fp=deb-src%2Flibwww-perl%2Flibwww-perl-5.813%2Ft%2Flive%2Fhttps.t;h=d7b6df1ed8d72c02d8fcd2ed3f3b2e4a2f6e81e4;hb=d615bbbf525d490a6803e161c1063da7ee8fb9bc;hp=0000000000000000000000000000000000000000;hpb=5638bd62c66215ffc4830630a7bfcfe5cdf331d7;p=pkg-perl diff --git a/deb-src/libwww-perl/libwww-perl-5.813/t/live/https.t b/deb-src/libwww-perl/libwww-perl-5.813/t/live/https.t new file mode 100644 index 0000000..d7b6df1 --- /dev/null +++ b/deb-src/libwww-perl/libwww-perl-5.813/t/live/https.t @@ -0,0 +1,23 @@ +#!perl -w + +use strict; +use LWP::UserAgent; + +my $ua = LWP::UserAgent->new(); +my $res = $ua->simple_request(HTTP::Request->new(GET => "https://www.sun.com")); + +if ($res->code == 501 && $res->message =~ /Protocol scheme 'https' is not supported/) { + print "1..0 # Skipped: " . $res->message . "\n"; + exit; +} + +print "1..2\n"; +print "not " unless $res->is_success; +print "ok 1\n"; + +print "not " unless $res->content =~ /Sun Microsystems/; +print "ok 2\n"; + +my $cref = $res->content_ref; +substr($$cref, 100) = "..." if length($$cref) > 100; +print "\n", $res->as_string;