X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2Feta-linear.t;h=5a80016e894a7190ebb2b602363833d199d6c362;hb=34ac983862368c022af1ffe37fe80de1abdec2a8;hp=3d4f06b3c2bcc89e9330995d9d993a96ac7692ef;hpb=834c61514d3dc3eb32aa31f14431c851a8cc62d3;p=term-progressbar.git diff --git a/t/eta-linear.t b/t/eta-linear.t index 3d4f06b..5a80016 100644 --- a/t/eta-linear.t +++ b/t/eta-linear.t @@ -12,7 +12,7 @@ This package tests the basic functionality of Term::ProgressBar. use Test::More tests => 9; use Test::Exception; -use Capture::Tiny qw(capture); +use Capture::Tiny qw(capture_stderr); use Term::ProgressBar; @@ -38,7 +38,7 @@ Update it it from 1 to 10. =cut { - my ($out, $err) = capture { + my $err = capture_stderr { my $p; lives_ok { $p = Term::ProgressBar->new({count => 10, name => 'fred', @@ -49,7 +49,6 @@ Update it it from 1 to 10. lives_ok { $p->message('Hello Mum!') } 'Count 1-10 (3)'; lives_ok { for (6..10) { $p->update($_); sleep 1 } } 'Count 1-10 (4)'; }; - print $out; my @lines = grep $_ ne '', split /[\n\r]+/, $err; diag explain \@lines