Skip to content

Instantly share code, notes, and snippets.

@delphinus
Created April 9, 2012 08:47
Show Gist options
  • Select an option

  • Save delphinus/2342373 to your computer and use it in GitHub Desktop.

Select an option

Save delphinus/2342373 to your computer and use it in GitHub Desktop.
script copile test
use Test::More;
use Capture::Tiny qw!capture!;
plan tests => 2;
my $script = 'test.pl';
my ($stdout, $stderr, undef) = capture {
system "perl -c $script";
};
is $stdout => '', "$script compile output none to STDOUT.";
is $stderr => <<ERR, "$script compile output true message to STDERR.";
$script syntax OK
ERR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment