File: proxy.t

package info (click to toggle)
libwww-perl 6.52-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 972 kB
  • sloc: perl: 4,063; makefile: 10; sh: 6
file content (15 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;
use Test::More;
use Test::Fatal;

use LWP::UserAgent;
plan tests => 2;

for my $varname ( qw(ABSURDLY_NAMED_PROXY MY_PROXY) ) {
    $ENV{ $varname } = "foobar";

    my $ua = LWP::UserAgent->new;
    is(exception{ $ua->env_proxy(); }, undef, "proxy: with env: $varname: no errors");
    delete $ENV{$varname};
}