perl/perl-5.31.7-Skip-the-new-open-pragma-tests-for-no-utf8-under-PER.patch

48 lines
1.4 KiB
Diff
Raw Normal View History

2020-03-27 13:56:31 +00:00
From 61e73f5d988b2ee25b2d90ea5570337398309e84 Mon Sep 17 00:00:00 2001
From: Nicholas Clark <nick@ccl4.org>
Date: Sun, 19 Jan 2020 21:56:02 +0100
Subject: [PATCH] Skip the new open pragma tests for no ":utf8" under
PERL_UNICODE.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PERL_UNICODE can implement an implicit use open ":utf8", which defeats the
intent of what we're testing here.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
dist/IO/t/io_utf8argv.t | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/dist/IO/t/io_utf8argv.t b/dist/IO/t/io_utf8argv.t
index adc95d999c..b6370709f1 100644
--- a/dist/IO/t/io_utf8argv.t
+++ b/dist/IO/t/io_utf8argv.t
@@ -33,12 +33,17 @@ close $fh or die "close: $!";
use IO::Handle;
-@ARGV = ('io_utf8argv') x 2;
-is *ARGV->getline, $bytes,
- 'getline (no open pragma) when magically opening ARGV';
+SKIP: {
+ skip("PERL_UNICODE set", 2)
+ if exists $ENV{PERL_UNICODE};
+
+ @ARGV = ('io_utf8argv') x 2;
+ is *ARGV->getline, $bytes,
+ 'getline (no open pragma) when magically opening ARGV';
-is join('',*ARGV->getlines), $bytes,
- 'getlines (no open pragma) when magically opening ARGV';
+ is join('',*ARGV->getlines), $bytes,
+ 'getlines (no open pragma) when magically opening ARGV';
+}
use open ":std", ":utf8";
--
2.21.1