c066ca195cbb40cbeda0407a57c4a23714fe02a7
[p5sagit/local-lib.git] / t / classmethod.t
1 use strict;
2 use warnings;
3 use Test::More tests => 4;;
4 use File::Temp;
5
6 use local::lib ();
7
8 my $c = 'local::lib';
9
10 {
11     is($c->resolve_empty_path, '~/perl5');
12     is($c->resolve_empty_path('foo'), 'foo');
13 }
14
15 {
16     no warnings 'once';
17     local *File::Spec::rel2abs = sub { shift; 'FOO'.shift; };
18     is($c->resolve_relative_path('bar'),'FOObar');
19 }
20
21 {
22     my $dir = File::Temp::tempdir();
23     $c->ensure_dir_structure_for("$dir/splat");
24     ok(-d "$dir/splat");
25 }