X-Git-Url: https://git.donarmstrong.com/?p=term-progressbar.git;a=blobdiff_plain;f=t%2Feta-linear.t;h=5a80016e894a7190ebb2b602363833d199d6c362;hp=3d4f06b3c2bcc89e9330995d9d993a96ac7692ef;hb=c3f8be419c0674c8a6fdb64bddd841a0957adf28;hpb=9d9b1d8162c51d1933dd8cfc5c440889d0326d2a 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