summaryrefslogtreecommitdiffstats
path: root/t/synopsis.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-08-05 13:06:42 -0500
committerJesse Luehrs <doy@tozt.net>2011-08-05 13:06:42 -0500
commit62adcc58969321a43e09dee9a2e9190e41f70803 (patch)
tree008019748f031a2630ed031c692dbc28233fe277 /t/synopsis.t
parent8daeacebd26830ca7bc395516c25bd005ca5e1d0 (diff)
downloadpackage-stash-xs-62adcc58969321a43e09dee9a2e9190e41f70803.tar.gz
package-stash-xs-62adcc58969321a43e09dee9a2e9190e41f70803.zip
remove test numbering
Diffstat (limited to 't/synopsis.t')
-rw-r--r--t/synopsis.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/synopsis.t b/t/synopsis.t
new file mode 100644
index 0000000..9f59948
--- /dev/null
+++ b/t/synopsis.t
@@ -0,0 +1,19 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More;
+
+use Package::Stash;
+
+my $stash = Package::Stash->new('Foo');
+$stash->add_symbol('%foo', {bar => 1});
+{
+ no warnings 'once';
+ is($Foo::foo{bar}, 1, "set in the stash properly");
+}
+ok(!$stash->has_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;