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