Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl] / deb-src / libtest-base-perl / libtest-base-perl-0.54 / t / tie_output.t
1 use Test::Base tests => 3;
2
3 my $out = "Stuff\n";
4 my $err = '';
5
6 tie_output(*STDOUT, $out);
7 tie_output(*STDERR, $err);
8
9 warn "Keep out!\n";
10
11 print "The eagle has landed\n";
12
13 is $out, "Stuff\nThe eagle has landed\n";
14
15 print "This bird had flown\n";
16
17 is $out, "Stuff\nThe eagle has landed\nThis bird had flown\n";
18
19 print STDERR "You 'lil rascal...\n";
20
21 is $err, "Keep out!\nYou 'lil rascal...\n";