Commit | Line | Data |
f8ec8cd2 |
1 | #!./perl -w |
70a6dec2 |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
5 | push @INC, '../lib'; |
6 | } |
7 | |
73afaec9 |
8 | use Test::More tests => 12; |
70a6dec2 |
9 | |
73afaec9 |
10 | BEGIN { |
11 | use_ok( 'less' ); |
12 | |
13 | package less::again; |
14 | sub stash_name {'less'} |
15 | @ISA = 'less'; |
16 | $INC{'less/again.pm'} = 1; |
17 | } |
6d39ae0a |
18 | |
19 | is_deeply([less->of], [], 'more please'); |
20 | use less; |
21 | is_deeply([less->of], ['please'],'less please'); |
73afaec9 |
22 | is_deeply([less::again->of], ['please'], 'less::again please'); |
6d39ae0a |
23 | no less; |
24 | is_deeply([less->of],[],'more please'); |
73afaec9 |
25 | is_deeply([less::again->of], [], 'no less::again please'); |
26 | use less::again; |
27 | is_deeply([less->of], ['please'],'less please'); |
28 | is_deeply([less::again->of], ['please'], 'less::again please'); |
29 | no less::again; |
30 | is_deeply([less->of],[],'more please'); |
31 | is_deeply([less::again->of], [], 'no less::again please'); |
6d39ae0a |
32 | |
33 | use less 'random acts'; |
34 | is_deeply([sort less->of],[sort qw(random acts)],'less random acts'); |
35 | |
36 | is(scalar less->of('random'),1,'less random'); |