]> iEval git - mafia.git/blame_incremental - t/examples.t
Reindent code, tests, Makefile.PL
[mafia.git] / t / examples.t
... / ...
CommitLineData
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) {
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.014649 seconds and 4 git commands to generate.