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