Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Capturing STDOUT tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Sergot committed Apr 14, 2012
1 parent 8fbaef0 commit c1e29f4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t0.p6
@@ -0,0 +1,16 @@
use IO::Capture::Simple;
use Test;
plan 2;

my $test = "OH HAI!";

my $r = capture_stdout { print $test }

ok $r ~~ $test;

$r = '';

capture_stdout($r);
print $test;
stdout_off;
ok $r ~~ $test;

0 comments on commit c1e29f4

Please sign in to comment.