]> iEval git - mafia.git/blame - t/examples.t
Bump version and update Changes
[mafia.git] / t / examples.t
CommitLineData
344e176e 1#!/usr/bin/perl
76b92037
MG
2use 5.010001;
3use strict;
344e176e
MG
4use warnings;
5
061dc5c7 6use File::Spec::Functions qw/rel2abs/;
344e176e 7use IO::Handle;
f1171346
MG
8
9my @examples;
76b92037
MG
10BEGIN { @examples = glob 't/examples/*.pl' };
11use Test::More tests => 1 + @examples;
12BEGIN { use_ok('Mafia') }
f1171346
MG
13
14for my $example (@examples) {
40af1ba2
MG
15 my $out;
16 close STDOUT;
17 open STDOUT, '>', \$out;
18 clean;
f1171346 19
061dc5c7 20 do rel2abs $example;
76b92037 21 $example =~ s/\.pl$//;
344e176e 22 my $ok = join '', IO::File->new("$example.out", '<')->getlines;
344e176e 23 is $out, $ok, substr $example, length 't/examples/'
f1171346 24}
This page took 0.02303 seconds and 4 git commands to generate.