summaryrefslogtreecommitdiff
path: root/t/local/autoload.t
blob: 0f77db08267e9184363614d46742e91ec05ebf4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# See if autoloading of protocol schemes work
#

use Test;
plan tests => 1;

require LWP::UserAgent;
# note no LWP::Protocol::file;

$url = "file:.";

require URI;
print "Trying to fetch '" . URI->new($url)->file . "'\n";

my $ua = new LWP::UserAgent;    # create a useragent to test
$ua->timeout(30);               # timeout in seconds

my $request = HTTP::Request->new(GET => $url);

my $response = $ua->request($request);
ok($response->is_success);