]> iEval git - mafia.git/blob - t/examples.t
Don't push/shift on array references
[mafia.git] / t / examples.t
1 #!/usr/bin/perl -w
2 use File::Basename qw/fileparse/;
3 use File::Slurp qw/read_file/;
4 use Mafia;
5
6 my @examples;
7 BEGIN { @examples = map { s/\.pl//r } glob 't/examples/*.pl' };
8 use Test::More tests => scalar @examples;
9
10 for my $example (@examples) {
11 my $out;
12 close STDOUT;
13 open STDOUT, '>', \$out;
14 clean;
15
16 my $ok = read_file "$example.out";
17 eval scalar read_file "$example.pl";
18 is $out, $ok, scalar fileparse $example
19 }
This page took 0.050475 seconds and 4 git commands to generate.