diff options
author | Ricardo Signes <rjbs@cpan.org> | 2010-01-12 11:12:47 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-01-12 11:46:55 -0500 |
commit | 73afaec9a8c17d03643a56b3842448c172a26285 (patch) | |
tree | b9f1a89f13700f02004c9db2abb4abfcb445e71b /lib/less.t | |
parent | 12d0f8b2172bac2326267d8b95c99383b794a31b (diff) | |
download | perl-73afaec9a8c17d03643a56b3842448c172a26285.tar.gz |
test stash_name in less.pm
Diffstat (limited to 'lib/less.t')
-rw-r--r-- | lib/less.t | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/less.t b/lib/less.t index 3cca6fa7c9..7713eb66e5 100644 --- a/lib/less.t +++ b/lib/less.t @@ -5,15 +5,30 @@ BEGIN { push @INC, '../lib'; } -use Test::More tests => 6; +use Test::More tests => 12; -BEGIN { use_ok( 'less' ) } +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'); |