summaryrefslogtreecommitdiffstats
path: root/t/010-synopsis.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-05-11 01:45:28 -0500
committerJesse Luehrs <doy@tozt.net>2010-05-11 01:45:28 -0500
commit3b9f59fdaf5084b92e08106c8a544b722404a45e (patch)
treed393ee9d78c1e892eed03cddb69b40749d2e8f0b /t/010-synopsis.t
parent683542f5131385a9b15cda277f279fb518f7f84a (diff)
downloadpackage-stash-3b9f59fdaf5084b92e08106c8a544b722404a45e.tar.gz
package-stash-3b9f59fdaf5084b92e08106c8a544b722404a45e.zip
synopsis test
Diffstat (limited to 't/010-synopsis.t')
-rw-r--r--t/010-synopsis.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/010-synopsis.t b/t/010-synopsis.t
new file mode 100644
index 0000000..5d29573
--- /dev/null
+++ b/t/010-synopsis.t
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Stash::Manip;
+
+my $stash = Stash::Manip->new('Foo');
+$stash->add_package_symbol('%foo', {bar => 1});
+{
+ no warnings 'once';
+ is($Foo::foo{bar}, 1, "set in the stash properly");
+}
+ok(!$stash->has_package_symbol('$foo'), "doesn't have anything in scalar slot");
+my $namespace = $stash->namespace;
+is_deeply(*{ $namespace->{foo} }{HASH}, {bar => 1}, "namespace works properly");
+
+done_testing;