From 918fbd43ad287e3a4b8f309a55f91e409747c895 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 14 Apr 2019 13:03:51 -0600 Subject: [PATCH] POSIX/t/mb.t: Skip test on early HP-UX There is a bug in this OS, fixed as of 11.31, in which mblen() doesn't return the proper result in the UTF-8 locale C.utf8. Any other UTF-8 locales on this platform are broken for another reason, being that a bunch of what Perl expects to be punctuation characters aren't. --- ext/POSIX/t/mb.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/POSIX/t/mb.t b/ext/POSIX/t/mb.t index 25bffe1..84de90e 100644 --- a/ext/POSIX/t/mb.t +++ b/ext/POSIX/t/mb.t @@ -42,11 +42,17 @@ SKIP: { 'use POSIX; print &POSIX::MB_CUR_MAX', qr/[4-6]/, {}, 'MB_CUR_MAX is at least 4 in a UTF-8 locale'); + SKIP: { + my ($major, $minor, $rest) = $Config{osvers} =~ / (\d+) \. (\d+) \. .* /x; + skip("mblen() broken (at least for c.utf8) on early HP-UX", 1) + if $Config{osname} eq 'hpux' + && $major < 11 || ($major == 11 && $minor < 31); fresh_perl_is( 'use POSIX; print &POSIX::mblen("' . I8_to_native("\x{c3}\x{28}") . '", 2)', -1, {}, 'mblen() recognizes invalid multibyte characters'); + } fresh_perl_is( 'use POSIX; print &POSIX::mblen("\N{GREEK SMALL LETTER SIGMA}", 2)', -- 1.8.3.1