This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Filip Sergot
committed
Apr 15, 2012
1 parent
a839819
commit 9d93929
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
use IO::Capture::Simple; | |||
use Test; | |||
|
|||
plan 2; | |||
|
|||
my $test = "OH HAI!"; | |||
|
|||
my $r = capture_stderr { note $test } | |||
|
|||
ok $r ~~ /$test/; | |||
|
|||
$r = ''; | |||
|
|||
capture_stderr($r); | |||
note $test; | |||
capture_stderr_off; | |||
|
|||
ok $r ~~ /$test/; |