File: 01-basic.t

package info (click to toggle)
libfind-lib-perl 1.04-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: perl: 124; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use Test::More tests => 9;

require 't/testutils.pl';

use File::Spec;
use Find::Lib 'mylib';
use_ok 'MyLib';

in_inc( 'mylib' );

my $base = Find::Lib->base;
ok $base, 'base() returns the directory of your script';
is $base, $Find::Lib::Base, "It's accessible from outside";

is (Find::Lib->catfile('something'), File::Spec->catfile($base, 'something'));
is (Find::Lib->catdir('dir'), File::Spec->catdir($base, 'dir'));
is (Find::Lib->catdir('..', 'dir'), File::Spec->catdir($base, '..', 'dir'));
unlike (Find::Lib->catdir("x"), qr/Find::Lib/, 'Bug with dumb Exporter use');