summaryrefslogtreecommitdiffstats
path: root/t/basic.t
diff options
context:
space:
mode:
Diffstat (limited to 't/basic.t')
-rw-r--r--t/basic.t11
1 files changed, 8 insertions, 3 deletions
diff --git a/t/basic.t b/t/basic.t
index f20e055..b0f9936 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -251,7 +251,13 @@ is($foo_stash->get_symbol('@foo'), $ARRAY, '... got the right values for @Foo::f
}
{
- $foo_stash->add_symbol('%zork');
+ $foo_stash->add_symbol('%bare');
+ ok(!$foo_stash->has_symbol('$bare'),
+ "add_symbol with single argument doesn't vivify scalar slot");
+}
+
+{
+ $foo_stash->add_symbol('%zork', {});
my $syms = $foo_stash->get_all_symbols('HASH');
@@ -265,10 +271,9 @@ is($foo_stash->get_symbol('@foo'), $ARRAY, '... got the right values for @Foo::f
is($syms->{$symbol}, $foo_stash->get_symbol('%' . $symbol), '... got the right symbol');
}
- no warnings 'once';
is_deeply(
$syms,
- { zork => \%Foo::zork },
+ { zork => *{ $Foo::{zork} }{HASH} },
"got the right ones",
);
}