Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test #1

  • Loading branch information...
commit da0457676a141fa3885d0906af92b6295dc8f054 1 parent c8d240c
@sergot authored
Showing with 8 additions and 11 deletions.
  1. +8 −11 t/t0.p6
View
19 t/t0.p6
@@ -1,18 +1,15 @@
use v6;
use Test;
-plan 1;
+plan 2;
use Term::ProgressBar;
+use IO::Capture::Simple;
-my $bar = Term::ProgressBar.new(count => 100, :p);
-my $r = ' ';
+my $bar = Term::ProgressBar.new(count => 100);
+my $r;
-$*OUT = class {
- method print(*@args) {
- $r ~= @args.join;
- }
-}
+$r = capture_stdout { $bar.update(50) }
+ok($r ~~ m/'[''='+' '+']'/);
-$bar.update(100);
-
-is $r, /100\%/;
+$r = capture_stdout { $bar.update(100) }
+ok($r ~~ m/'[''='+']'/);
Please sign in to comment.
Something went wrong with that request. Please try again.