File: classmethod.t

package info (click to toggle)
liblocal-lib-perl 2.000014-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 308 kB
  • ctags: 72
  • sloc: perl: 727; makefile: 22
file content (22 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use warnings;
use Test::More tests => 4;
use File::Temp;

use local::lib ();

my $c = 'local::lib';

{
    is($c->resolve_empty_path, '~/perl5');
    is($c->resolve_empty_path('foo'), 'foo');
}

{
    my $warn = '';
    local $SIG{__WARN__} = sub { $warn .= $_[0] };
    my $dir = File::Temp::tempdir();
    $c->ensure_dir_structure_for("$dir/splat");
    ok(-d "$dir/splat");
    like($warn, qr/^Attempting to create directory/);
}