From adda4f43e39cff45cf4d443dd93216644fca3afa Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Aug 2011 13:08:04 -0500 Subject: remove test numbers --- t/synopsis.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 t/synopsis.t (limited to 't/synopsis.t') 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; -- cgit v1.2.3-54-g00ecf