blob: 1142b426ed12206099c6ee0882a3728244dd5add (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/perl -w
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
@INC = ('../lib', 'lib');
}
else {
unshift @INC, 't/lib';
}
}
use strict;
use warnings;
use TieOut;
use Test::More tests => 2;
{
my $test = Test::More->builder;
my $output = tie *FAKEOUT, "TieOut";
my $fail_output = tie *FAKEERR, "TieOut";
$test->output (*FAKEOUT);
$test->failure_output(*FAKEERR);
note("foo");
$test->reset_outputs;
is $output->read, "# foo\n";
is $fail_output->read, '';
}
|