In perl.git, the branch smoke-me/khw-locale has been updated <https://perl5.git.perl.org/perl.git/commitdiff/97f38c8d77f8da43690c8af0369296cd16af2964?hp=ada53853270d7c01061eb3c3bea26a5ae1a3846f>
- Log ----------------------------------------------------------------- commit 97f38c8d77f8da43690c8af0369296cd16af2964 Author: Karl Williamson <[email protected]> Date: Wed Apr 3 16:15:29 2019 -0600 f ----------------------------------------------------------------------- Summary of changes: ext/POSIX/t/mb.t | 9 ++++++--- handy.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/POSIX/t/mb.t b/ext/POSIX/t/mb.t index 355917efef..2f85cb9ebe 100644 --- a/ext/POSIX/t/mb.t +++ b/ext/POSIX/t/mb.t @@ -38,19 +38,22 @@ SKIP: { local $ENV{LC_ALL}; delete $ENV{LC_ALL}; - ok &POSIX::MB_CUR_MAX >= 4, 'MB_CUR_MAX is at least 4 in a UTF-8 locale'; + fresh_perl_like( + 'use POSIX; print &POSIX::MB_CUR_MAX', + qr/[4-6]/, {}, 'MB_CUR_MAX is at least 4 in a UTF-8 locale'); fresh_perl_is( 'use POSIX; print &POSIX::mblen(undef,0);', 0, {}, 'A UTF-8 locale is stateless (resets shift state as a side effect)'); fresh_perl_is( - 'use POSIX; print &POSIX::mblen("' + 'use POSIX; &POSIX::mblen(undef,0); 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)', + 'use POSIX; &POSIX::mblen(undef,0); + print &POSIX::mblen("\N{GREEK SMALL LETTER SIGMA}", 2)', 2, {}, 'mblen() works on UTF-8 characters'); } diff --git a/handy.h b/handy.h index a5e2c6b442..5b4778e664 100644 --- a/handy.h +++ b/handy.h @@ -1508,7 +1508,7 @@ END_EXTERN_C /* Use table lookup for speed; returns the input itself if is out-of-range */ #define toLOWER_LATIN1(c) ((! FITS_IN_8_BITS(c)) \ - ? (U8) (c) \ + ? (c) \ : PL_latin1_lc[ (U8) (c) ]) #define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */ -- Perl5 Master Repository
