summaryrefslogtreecommitdiffstats
path: root/t/warnings.t
diff options
context:
space:
mode:
Diffstat (limited to 't/warnings.t')
-rw-r--r--t/warnings.t21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/warnings.t b/t/warnings.t
new file mode 100644
index 0000000..2dd5929
--- /dev/null
+++ b/t/warnings.t
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Package::Stash;
+
+my $warnings;
+BEGIN {
+ $warnings = '';
+ $SIG{__WARN__} = sub { $warnings .= $_[0] };
+}
+
+BEGIN {
+ my $stash = Package::Stash->new('Foo');
+ $stash->get_or_add_symbol('$bar');
+}
+
+is($warnings, '');
+
+done_testing;