]> git.donarmstrong.com Git - term-progressbar.git/blobdiff - t/v2-mobile.t
switch to useint Test::Exception instead of the home made code, remote test.pm
[term-progressbar.git] / t / v2-mobile.t
index 5021f2d6f3a4cd20e218a3d3f8f933fd6f5dc62b..5176a52b8cfec437274dcd3f6ffec49793c36130 100644 (file)
@@ -9,11 +9,8 @@ This package tests the moving target functionality of Term::ProgressBar.
 =cut
 
 use Data::Dumper qw( Dumper );
-use FindBin      qw( $Bin );
 use Test::More tests => 7;
-
-use lib $Bin;
-use test qw( evcheck );
+use Test::Exception;
 
 use Capture::Tiny qw(capture);
 
@@ -41,14 +38,10 @@ Update it from 11 to 20.
 
 my ($out, $err) = capture {
   my $p;
-  ok (evcheck(sub { $p = Term::ProgressBar->new(10); }, 'Count 1-20 (1)' ),
-      'Count 1-20 (1)');
-  ok (evcheck(sub { $p->update($_) for 1..5  },  'Count 1-20 (2)' ),
-      'Count 1-20 (2)');
-  ok (evcheck(sub { $p->target(20)    },         'Count 1-20 (3)' ),
-      'Count 1-20 (3)');
-  ok (evcheck(sub { $p->update($_) for 11..20 }, 'Count 1-20 (4)' ),
-      'Count 1-20 (4)');
+  lives_ok { $p = Term::ProgressBar->new(10); } 'Count 1-20 (1)';
+  lives_ok { $p->update($_) for 1..5  }    'Count 1-20 (2)';
+  lives_ok { $p->target(20)    }           'Count 1-20 (3)';
+  lives_ok { $p->update($_) for 11..20 }   'Count 1-20 (4)';
 };
 print $out;