Created
April 9, 2012 08:47
-
-
Save delphinus/2342373 to your computer and use it in GitHub Desktop.
script copile test
This file contains hidden or 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
| 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