perl/perl-5.18.2-Make-t-comp-parser.t-get-the-correct-libraries.patch
Petr Písař 6163468508 Fix t/comp/parser.t not to load system modules
The fact that "perl" tests (t/base/*.t, t/comp/*.t, t/run/*.t) are run
without -I is intentional. One has to fix each of them.
2014-04-04 14:24:59 +02:00

50 lines
1.5 KiB
Diff

From 56b960b25894b4b1e1f2ce0ff443c187860bdf76 Mon Sep 17 00:00:00 2001
From: "Craig A. Berry" <craigberry@mac.com>
Date: Sun, 30 Jun 2013 21:09:21 -0500
Subject: [PATCH] Make t/comp/parser.t get the correct libraries.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In principle it shouldn't need libraries, but an eval of a utf8
constant now triggers automatic loading of utf8.pm, and it was
looking for that in the usual @INC locations set at configuration
time. Which just might match an installed perl rather than the
perl being tested. So make sure we get the correct libraries.
Petr Pisar: Ported to 5.18.2
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/comp/parser.t | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/comp/parser.t b/t/comp/parser.t
index 4f2da90..f64d5ce 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -3,6 +3,11 @@
# Checks if the parser behaves correctly in edge cases
# (including weird syntax errors)
+BEGIN {
+ @INC = qw(. ../lib);
+ chdir 't';
+}
+
print "1..155\n";
sub failed {
@@ -462,7 +467,7 @@ like $@, "^Identifier too long at ", 'ident buffer overflow';
# bug #74022: Loop on characters in \p{OtherIDContinue}
# This test hangs if it fails.
-eval chr 0x387;
+eval chr 0x387; # forces loading of utf8.pm
is(1,1, '[perl #74022] Parser looping on OtherIDContinue chars');
# More awkward tests for #line. Keep these at the end, as they will screw
--
1.9.0