LWP-UserAgent-ProgressBar

 view release on metacpan or  search on metacpan

t/01_misc.t  view on Meta::CPAN

use File::Spec;
use LWP::UserAgent::ProgressBar;
use Test::More tests => 4;
use Test::Differences;

# get
{
    my $self_path = $0;
       $self_path = abs_path($self_path)
            unless File::Spec->file_name_is_absolute($self_path);
    my $self_content = do { local (@ARGV, $/) = $self_path; <> };
    my $self_url = "file://$self_path";
    my $response =
    LWP::UserAgent::ProgressBar->new->get_with_progress($self_url,
        bar_name => '# ',);
    ok($response->is_success, 'successful download');
    my $content = $response->content;
    eq_or_diff $content, $self_content, 'content matches';
}

# post

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.533 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )