File: print.t

package info (click to toggle)
libautobox-core-perl 1.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 328 kB
  • ctags: 161
  • sloc: perl: 567; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Test::More qw(no_plan);
use strict;
use warnings;

use autobox::Core;

my $message = "This is an important message";
my @array   = qw(this is an important message);

SKIP: {
    my $has_test_output = eval { require Test::Output };

    skip "Don't have Test::Output", 2, if not $has_test_output;
    Test::Output::stdout_is( sub { $message->print }, $message );
    Test::Output::stdout_is( sub { @array->print }, "@array" );
}

# We need at least one test so that Test::Harness doesn't complain in
# case we had to skip above

ok 1;