summaryrefslogtreecommitdiff
path: root/lib/less.t
blob: 7713eb66e598adcfa97f7bc7456c9818bc0e8ee0 (plain)
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
28
29
30
31
32
33
34
35
36
#!./perl -w

BEGIN {
    chdir 't' if -d 't';
    push @INC, '../lib';
}

use Test::More tests => 12;

BEGIN {
    use_ok( 'less' );

    package less::again;
    sub stash_name {'less'}
    @ISA = 'less';
    $INC{'less/again.pm'} = 1;
}

is_deeply([less->of], [], 'more please');
use less;
is_deeply([less->of], ['please'],'less please');
is_deeply([less::again->of], ['please'], 'less::again please');
no less;
is_deeply([less->of],[],'more please');
is_deeply([less::again->of], [], 'no less::again please');
use less::again;
is_deeply([less->of], ['please'],'less please');
is_deeply([less::again->of], ['please'], 'less::again please');
no less::again;
is_deeply([less->of],[],'more please');
is_deeply([less::again->of], [], 'no less::again please');

use less 'random acts';
is_deeply([sort less->of],[sort qw(random acts)],'less random acts');

is(scalar less->of('random'),1,'less random');