diff options
Diffstat (limited to 't/hidden_cycle.t')
-rw-r--r-- | t/hidden_cycle.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/hidden_cycle.t b/t/hidden_cycle.t new file mode 100644 index 0000000..a2b33f1 --- /dev/null +++ b/t/hidden_cycle.t @@ -0,0 +1,23 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use lib 't/hidden_cycle'; +use Test::More; + +no circular::require -hide => [qw(Bar Baz)]; + +my @warnings; + +{ + $SIG{__WARN__} = sub { push @warnings => @_ }; + + use_ok( 'Foo' ); +} + +is_deeply( + \@warnings, + ["Circular require detected: Bar.pm (from <unknown file>)\n"], + "hiding all packages in the cycle shouldn't report a package outside of the cycle as being the source" +); + +done_testing; |