summaryrefslogtreecommitdiffstats
path: root/t/long_cycle.t
diff options
context:
space:
mode:
Diffstat (limited to 't/long_cycle.t')
-rw-r--r--t/long_cycle.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/long_cycle.t b/t/long_cycle.t
new file mode 100644
index 0000000..fb0c703
--- /dev/null
+++ b/t/long_cycle.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/long_cycle';
+
+no circular::require;
+
+my @warnings;
+
+{
+ $SIG{__WARN__} = sub { push @warnings => @_ };
+
+ use_ok( 'Foo' );
+}
+
+is_deeply(
+ \@warnings,
+ ["Circular require detected:\n Bar.pm\n Baz.pm\n Quux.pm\n Blorg.pm\n Bar.pm\n"],
+ "detection of longer cycles"
+);
+
+done_testing;