"Fossies" - the Fresh Open Source Software Archive

Member "libwww-perl-6.43/xt/author/live/online.t" (26 Nov 2019, 378 Bytes) of package /linux/www/libwww-perl-6.43.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 use strict;
    2 use warnings;
    3 use Test::More;
    4 
    5 use LWP::UserAgent;
    6 
    7 plan tests => 4;
    8 
    9 my $ua = LWP::UserAgent->new;
   10 
   11 is($ua->protocols_allowed(), undef, 'protocols_allowed: undefined');
   12 ok($ua->is_online, 'is_online: truthy value');
   13 
   14 $ua->protocols_allowed([]);
   15 is_deeply($ua->protocols_allowed, [], 'protocols_allowed: empty list');
   16 ok(!$ua->is_online, 'is_online: falsey value');