Fix bug in test
[mafia.git] / t / examples.t
index 977cd6ef290bf17dc87111e2caac94f330186958..61606d8ee7b6c3855eef4a369994c37cefaf660d 100644 (file)
@@ -3,7 +3,8 @@ use 5.010001;
 use strict;
 use warnings;
 
-use IO::Handle;
+use File::Spec::Functions qw/rel2abs/;
+use IO::File;
 
 my @examples;
 BEGIN { @examples = glob 't/examples/*.pl' };
@@ -16,7 +17,7 @@ for my $example (@examples) {
        open STDOUT, '>', \$out;
        clean;
 
-       do $example;
+       do(rel2abs($example));
        $example =~ s/\.pl$//;
        my $ok = join '', IO::File->new("$example.out", '<')->getlines;
        is $out, $ok, substr $example, length 't/examples/'
This page took 0.009126 seconds and 4 git commands to generate.