summaryrefslogtreecommitdiff
path: root/t/comp/require.t
diff options
context:
space:
mode:
Diffstat (limited to 't/comp/require.t')
-rw-r--r--t/comp/require.t16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/comp/require.t b/t/comp/require.t
index d4ca56c077..4200004113 100644
--- a/t/comp/require.t
+++ b/t/comp/require.t
@@ -22,7 +22,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc);
my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/;
-my $total_tests = 50;
+my $total_tests = 51;
if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; }
print "1..$total_tests\n";
@@ -259,6 +259,20 @@ EOT
}
}
+# Test "require func()" with abs path when there is no .pmc file.
+++$::i;
+require Cwd;
+require File::Spec::Functions;
+eval {
+ CORE::require(File::Spec::Functions::catfile(Cwd::getcwd(),"bleah.pm"));
+};
+if ($@ =~ /^This is an expected error/) {
+ print "ok $i\n";
+} else {
+ print "not ok $i\n";
+}
+
+
##########################################
# What follows are UTF-8 specific tests. #
# Add generic tests before this point. #