diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-09-05 20:02:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-09-05 20:02:22 -0500 |
commit | 12b5662ca1ca213389b3d4af99f8616b2129f0cc (patch) | |
tree | 55e27ce0b0bc8573db36a22da7352a9a88f50485 /t | |
parent | 949492165093e3f9fc2019be296f02a503aba43f (diff) | |
download | package-stash-12b5662ca1ca213389b3d4af99f8616b2129f0cc.tar.gz package-stash-12b5662ca1ca213389b3d4af99f8616b2129f0cc.zip |
tests, and make this actually work
Diffstat (limited to 't')
-rw-r--r-- | t/basic.t | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -417,4 +417,24 @@ like(exception { ); } +for my $package ('Foo:Bar', 'Foo/Bar', 'Foo Bar', 'Foo:::Bar', '') { + like( + exception { Package::Stash->new($package) }, + qr/^$package is not a module name/, + "$package is not a module name" + ); +} + +like( + exception { Package::Stash->new([]) }, + qr/^Package::Stash->new must be passed the name of the package to access/, + "module name must be a string" +); + +like( + exception { Package::Stash->new(undef) }, + qr/^Package::Stash->new must be passed the name of the package to access/, + "module name must be a string" +); + done_testing; |