summaryrefslogtreecommitdiffstats
path: root/t/01-basic.t
diff options
context:
space:
mode:
Diffstat (limited to 't/01-basic.t')
-rw-r--r--t/01-basic.t32
1 files changed, 31 insertions, 1 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
index 5ddde3f..a921d1e 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -4,7 +4,9 @@ use warnings;
use lib 't/01';
use Test::More;
-no circular::require;
+use circular::require ();
+
+circular::require->unimport;
{
my $warnings;
@@ -30,9 +32,37 @@ no circular::require;
clear();
}
+circular::require->import;
+
+{
+ my $warnings;
+ local $SIG{__WARN__} = sub { $warnings .= $_[0] };
+ use_ok('Foo');
+ is($warnings, undef, "correct warnings");
+ clear();
+}
+
+{
+ my $warnings;
+ local $SIG{__WARN__} = sub { $warnings .= $_[0] };
+ use_ok('Bar');
+ is($warnings, undef, "correct warnings");
+ clear();
+}
+
+{
+ my $warnings;
+ local $SIG{__WARN__} = sub { $warnings .= $_[0] };
+ use_ok('Baz');
+ is($warnings, undef, "correct warnings");
+ clear();
+}
+
sub clear {
for (qw(Foo Bar Baz)) {
+ no strict 'refs';
delete $::{$_};
+ delete ${$_ . '::'}{quux};
delete $INC{"$_.pm"};
}
}