]>
Commit | Line | Data |
---|---|---|
f1171346 MG |
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) { | |
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 | } |