File: basic.t

package info (click to toggle)
libfile-findlib-perl 0.001004-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 132 kB
  • sloc: perl: 280; makefile: 2
file content (27 lines) | stat: -rwxr-xr-x 794 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
23
24
25
26
27
#!/usr/bin/perl -w
use strict;
use File::Basename          qw< dirname >;
use File::Spec::Functions   qw< rel2abs >;
use lib dirname(__FILE__) . '/../inc';

use MyTest  qw< plan Okay SkipIf Lives Dies >;

BEGIN {
    plan(
        tests => 7,
        # todo => [ 2, 3 ],
    );

    require File::FindLib;
    Okay( 1, 1, 'Load module' );
}

Okay( !1, ! File::FindLib->import('t'), 'Import t should return true value' );
Okay( rel2abs(dirname(__FILE__)), $INC[0], 'Unshifted t dir onto @INC' );

Okay( !1, ! File::FindLib->import('t/FindMe.pm'),
    'Import FindMe should return true value' );
Okay( $FindMe::VERSION, $File::FindLib::VERSION, 'Found right FindMe' );
Okay( 1, require FindMe, 'require FindMe gives 1' );
{ no warnings 'once';
Okay( 1, $FindMe::loaded, 'FindMe loaded once' ); }