From: Rafael Garcia-Suarez Date: Tue, 17 Jan 2006 21:22:38 +0000 (+0000) Subject: Regression test for change #26881 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f1913749ad3dc95502a87e2ec7f25f559ea81323;p=p5sagit%2Fp5-mst-13.2.git Regression test for change #26881 p4raw-link: @26881 on //depot/perl: ae706db49f17350f7e2ed5eccdc792223f4ea020 p4raw-id: //depot/perl@26883 --- diff --git a/t/comp/require.t b/t/comp/require.t index d0ad1f8..ae3da43 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -11,7 +11,7 @@ $i = 1; my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 45; +my $total_tests = 46; if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } print "1..$total_tests\n"; @@ -209,6 +209,15 @@ sub bytes_to_utf16 { $i++; do_require(bytes_to_utf16('n', qq(print "ok $i\\n"; 1;\n), 1)); # BE $i++; do_require(bytes_to_utf16('v', qq(print "ok $i\\n"; 1;\n), 1)); # LE +write_file('bleah.pm', qq(die "This is an expected error";\n)); +delete $INC{"bleah.pm"}; ++$::i; +eval { CORE::require bleah; }; +if ($@ =~ /^This is an expected error/) { + print "ok $i\n"; +} else { + print "not ok $i\n"; +} + END { 1 while unlink 'bleah.pm'; 1 while unlink 'bleah.do';