SHA256
1
0
forked from pool/perl
perl/perl-5.21.8-lib-h2ph.t-to-test-generated-t-_h2ph_pre.ph-instead-.patch
Stephan Kulow 4bcbc0d435 Accepting request 287332 from home:namtrac:bugfix
- Add multiple patches for gcc5 support, tracked by RT#123784
  * perl-5.20.2-Fix-Errno.pm-generation-for-gcc-5.0.patch
  * perl-5.21.8-h2ph-correct-handling-of-hex-constants-for-the-pream.patch
  * perl-5.21.8-lib-h2ph.t-to-test-generated-t-_h2ph_pre.ph-instead-.patch

OBS-URL: https://build.opensuse.org/request/show/287332
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=128
2015-02-24 21:31:40 +00:00

40 lines
1.3 KiB
Diff

From ae54661bfad51c56e0d5c01bace60d44513a77e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 17 Feb 2015 13:11:00 +0100
Subject: [PATCH] lib/h2ph.t to test generated t/_h2ph_pre.ph instead of the
system one
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The lib/h2ph.t test executes a t/lib/h2ph.pht which requires
'_h2ph_pre.ph'. This should find and exercise generated t/_h2ph_pre.ph
file. However, it found a loaded _h2ph_pre.ph from system because the
interpreter has the './' directory after the system paths in the @INC by
default.
This patch adds '-I./' to the runperl() invocation to prefer the
_h2ph_pre.ph generated at build time.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
lib/h2ph.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
--
2.1.0