summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-12-15 18:16:20 +0000
committerSteve Peters <steve@fisharerojo.org>2005-12-15 18:16:20 +0000
commit025c9c97970dd42da17918069c5fa84dc841e733 (patch)
tree5dd3be3ecbbfa623ce7d3e609f41963c6fe91951 /t
parent2e6a7e23333d305fb863f36ae0c2231e95e85865 (diff)
downloadperl-025c9c97970dd42da17918069c5fa84dc841e733.tar.gz
Added test for change #26373.
p4raw-link: @26373 on //depot/perl: ce8abf5f5d2e5b19646ab17c24a3ea87c70428c8 p4raw-id: //depot/perl@26375
Diffstat (limited to 't')
-rwxr-xr-xt/comp/require.t15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/comp/require.t b/t/comp/require.t
index f16b8eb457..6dfa14e3d7 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';