summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-23 12:48:20 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-23 12:48:20 +0200
commit4cc3976697bb71e4acaa99a5cd69aee0159bbb90 (patch)
tree3ee2c940ef781cc39330765300f0ff1a09cca279
parent31f5e3239bb55c4356d7c595f3c1261faf94426e (diff)
downloadperl-4cc3976697bb71e4acaa99a5cd69aee0159bbb90.tar.gz
Move the test for recursive call to Perl_load_module to t/io/perlio.t
It's a croak(), not a warning, so doesn't really belong in lib/warnings.t [This also implicitly fixes the wrong expected output of 69dc7e4bdb8e397c]
-rw-r--r--t/io/perlio.t16
-rw-r--r--t/lib/warnings/perlio12
2 files changed, 15 insertions, 13 deletions
diff --git a/t/io/perlio.t b/t/io/perlio.t
index f6e7fc471a..18c2028a66 100644
--- a/t/io/perlio.t
+++ b/t/io/perlio.t
@@ -6,7 +6,7 @@ BEGIN {
skip_all_without_perlio();
}
-plan tests => 44;
+plan tests => 45;
use_ok('PerlIO');
@@ -201,6 +201,20 @@ SKIP: {
}
+{
+ # see RT #75722, RT #96008
+ fresh_perl_like(<<'EOP',
+unshift @INC, sub {
+ return undef unless caller eq "main";
+ open my $fh, "<", \1;
+ $fh;
+};
+require Symbol; # doesn't matter whether it exists or not
+EOP
+ qr/\ARecursive call to Perl_load_module in PerlIO_find_layer at/s,
+ {stderr => 1},
+ 'Mutal recursion between Perl_load_module and PerlIO_find_layer croaks');
+}
END {
unlink_all $txt;
diff --git a/t/lib/warnings/perlio b/t/lib/warnings/perlio
index d90453b9c8..0ccc5a884f 100644
--- a/t/lib/warnings/perlio
+++ b/t/lib/warnings/perlio
@@ -24,18 +24,6 @@ Unknown PerlIO layer \"%.*s\"
__END__
-# perlio [PerlIO_find_layer]
-unshift @INC, sub {
- return undef unless caller eq "main";
- open my $fh, "<", \1;
- $fh;
-};
-require Symbol; # doesn't matter whether it exists or no
-EXPECT
-Recursive call to Perl_load_module in PerlIO_find_layer at - line 5.
-BEGIN failed--compilation aborted.
-########
-
# perlio [PerlIO_parse_layers]
no warnings 'layer';
open(F, ">:-aa", "bb");