make sure we don't get warnings about redefining symbols
[gitmo/Package-Stash.git] / t / edge-cases.t
index d1e5182..262c13b 100755 (executable)
@@ -80,4 +80,13 @@ SKIP: {
     );
 }
 
+{
+    my $warning;
+    local $SIG{__WARN__} = sub { $warning = $_[0] };
+    my $stash = Package::Stash->new('Bar');
+    $stash->add_symbol('&foo' => sub { });
+    $stash->add_symbol('&foo' => sub { });
+    is($warning, undef, "no redefinition warnings");
+}
+
 done_testing;