From: Marius Gavrilescu Date: Sat, 8 Apr 2017 17:17:54 +0000 (+0300) Subject: Use absolute paths in tests X-Git-Tag: 0.001003~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=061dc5c793b0afe6bd7b8c3aaf9da1df8402aef6;hp=07cf0f1b38822c3194bcbe81ced61c171fba76cd;p=mafia.git Use absolute paths in tests --- diff --git a/t/examples.t b/t/examples.t index 977cd6e..56423e7 100644 --- a/t/examples.t +++ b/t/examples.t @@ -3,6 +3,7 @@ use 5.010001; use strict; use warnings; +use File::Spec::Functions qw/rel2abs/; use IO::Handle; my @examples; @@ -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/'