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