silence "Name "File::Spec::rel2abs" used only once: possible typo"
[p5sagit/local-lib.git] / t / classmethod.t
1
2 use strict;
3 use warnings;
4 use Test::More 'no_plan';
5 use local::lib ();
6
7
8 my $c = 'local::lib';
9
10
11 {
12
13 is($c->resolve_empty_path, '~/perl5');
14 is($c->resolve_empty_path('foo'), 'foo');
15
16 }
17
18 {
19
20 no warnings 'once';
21 local *File::Spec::rel2abs = sub { shift; 'FOO'.shift; };
22 is($c->resolve_relative_path('bar'),'FOObar');
23
24 }
25
26 {
27
28 File::Path::rmtree('t/var/splat');
29
30 $c->ensure_dir_structure_for('t/var/splat');
31
32 ok(-d 't/var/splat');
33
34 }