From: Steve Peters Date: Thu, 15 Dec 2005 18:16:20 +0000 (+0000) Subject: Added test for change #26373. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=025c9c97970dd42da17918069c5fa84dc841e733;p=p5sagit%2Fp5-mst-13.2.git Added test for change #26373. p4raw-link: @26373 on //depot/perl: ce8abf5f5d2e5b19646ab17c24a3ea87c70428c8 p4raw-id: //depot/perl@26375 --- diff --git a/t/comp/require.t b/t/comp/require.t index f16b8eb..6dfa14e 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -11,8 +11,8 @@ $i = 1; my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 44; -if ($Is_EBCDIC || $Is_UTF8) { $total_tests = 41; } +my $total_tests = 45; +if ($Is_EBCDIC || $Is_UTF8) { $total_tests = 42; } print "1..$total_tests\n"; sub do_require { @@ -195,6 +195,17 @@ 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 +# Test for fix of RT #24404 : "require $scalar" may load a directory +my $r = "threads"; +eval { require $r }; +$i++; +if($@ =~ /Directory .*threads not allowed in require/) { + print "ok $i\n"; +} else { + print "not ok $i\n"; +} + + END { 1 while unlink 'bleah.pm'; 1 while unlink 'bleah.do';