Skip to content

Commit

Permalink
add loader test
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Jan 25, 2009
1 parent e6817a8 commit 83cdde5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/02_load.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
use Config;
use FindBin;
use File::Spec;
use File::Path;

my $dir;
BEGIN {
$dir = File::Spec->catfile($FindBin::Bin, "blib", "arch", $Config{version}, $Config{archname});
unless (-e $dir) {
mkpath $dir, 0, 0777 or die $!;
open my $out, ">", "$dir/Foo.pm";
print $out "package Foo; \$VERSION = '1.0';\n1;\n";
}
}

use Test::More tests => 1;
use blib::portable 't/blib';
use Foo;

is $Foo::VERSION, '1.0';

END { rmdir $dir }

0 comments on commit 83cdde5

Please sign in to comment.