5 $ua = LWP::UserAgent->new;
8 print "not " unless $ua->agent =~ /^libwww-perl/;
12 print "not " if defined $ua->proxy(ftp => "http://www.sol.no");
15 print "not " unless $ua->proxy("ftp") eq "http://www.sol.no";
18 @a = $ua->proxy([qw(ftp http wais)], "http://proxy.foo.com");
20 for (@a) { $_ = "undef" unless defined; }
22 print "not " unless "@a" eq "http://www.sol.no undef undef";
25 print "not " unless $ua->proxy("http") eq "http://proxy.foo.com";
28 print "not " unless ref($ua->default_headers) eq "HTTP::Headers";
31 $ua->default_header("Foo" => "bar", "Multi" => [1, 2]);
32 print "not " unless $ua->default_headers->header("Foo") eq "bar";
35 print "not " unless $ua->default_header("Foo") eq "bar";
39 $ua->proxy(http => "loopback:");
40 $ua->agent("foo/0.1");
42 print "not " unless $ua->get("http://www.example.com", x => "y")->content eq <<EOT; print "ok 9\n";
43 GET http://www.example.com
52 print "not " unless (ref($clone->{proxy}) eq 'HASH');