4d81668cf7
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Devel-Cycle?expand=0&rev=4
36 lines
795 B
Diff
36 lines
795 B
Diff
--- t/Devel-Cycle.old 2008-07-08 21:26:35.000000000 -0400
|
|
+++ t/Devel-Cycle.t 2010-04-16 20:39:04.000000000 -0400
|
|
@@ -5,7 +5,7 @@
|
|
|
|
# change 'tests => 1' to 'tests => last_test_to_print';
|
|
|
|
-use Test::More tests => 12;
|
|
+use Test::More tests => 13;
|
|
use Scalar::Util qw(weaken isweak);
|
|
BEGIN { use_ok('Devel::Cycle') };
|
|
|
|
@@ -87,6 +87,7 @@
|
|
}
|
|
|
|
{
|
|
+ no warnings qw{ once };
|
|
*FOOBAR = *FOOBAR if 0; # cease -w
|
|
my $test2 = { glob => \*FOOBAR };
|
|
|
|
@@ -101,6 +102,15 @@
|
|
is("@warnings", "", "Warn only once");
|
|
}
|
|
|
|
+{
|
|
+ my $test_re = qr{foo}xms;
|
|
+
|
|
+ my @warnings;
|
|
+ local $SIG{__WARN__} = sub { push @warnings, @_ };
|
|
+ find_cycle($test_re);
|
|
+ ok( !@warnings, 'No warnings on Regex' );
|
|
+}
|
|
+
|
|
package foo;
|
|
use overload q("") => sub{ return 1 }; # show false alarm
|
|
|