summaryrefslogtreecommitdiffstats
path: root/t/dynamic3.t
diff options
context:
space:
mode:
Diffstat (limited to 't/dynamic3.t')
-rw-r--r--t/dynamic3.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/dynamic3.t b/t/dynamic3.t
new file mode 100644
index 0000000..2b70125
--- /dev/null
+++ b/t/dynamic3.t
@@ -0,0 +1,12 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/dynamic3';
+
+my $warnings;
+local $SIG{__WARN__} = sub { $warnings .= $_[0] };
+use_ok('Foo');
+is($warnings, "Circular require detected:\n Bar2.pm\n Bar3.pm\n Bar2.pm\n", "correct warnings");
+
+done_testing;