summaryrefslogtreecommitdiffstats
path: root/t/basic.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-09-05 20:03:04 -0500
committerJesse Luehrs <doy@tozt.net>2011-09-05 20:05:28 -0500
commitd0d52465c46f70ad17b14a90db6e5e5eb557b591 (patch)
tree6f1e5602e538cfda5b3c08a7cf1d8f00b76738be /t/basic.t
parentd62ef9096ad729b407a644bc2f97717ecc6889ea (diff)
downloadpackage-stash-xs-d0d52465c46f70ad17b14a90db6e5e5eb557b591.tar.gz
package-stash-xs-d0d52465c46f70ad17b14a90db6e5e5eb557b591.zip
sync tests
Diffstat (limited to 't/basic.t')
-rw-r--r--t/basic.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/basic.t b/t/basic.t
index a106e9e..f20e055 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -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;