This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/POSIX/t/mb.t: Use actual expected char len
authorKarl Williamson <khw@cpan.org>
Wed, 3 Apr 2019 18:20:08 +0000 (12:20 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 9 Apr 2019 18:02:19 +0000 (12:02 -0600)
Some platforms want the precise number of expected bytes passed to
mblen(), not just some maximum.

ext/POSIX/t/mb.t

index 785400a..32f7f95 100644 (file)
@@ -41,10 +41,10 @@ SKIP: {
     fresh_perl_is(
         'use POSIX; print &POSIX::mblen("'
       . I8_to_native("\x{c3}\x{28}")
-      . '", &POSIX::MB_CUR_MAX)',
+      . '", 2)',
       -1, {}, 'mblen() recognizes invalid multibyte characters');
 
     fresh_perl_is(
-     'use POSIX; print &POSIX::mblen("\N{GREEK SMALL LETTER SIGMA}", &POSIX::MB_CUR_MAX)',
+     'use POSIX; print &POSIX::mblen("\N{GREEK SMALL LETTER SIGMA}", 2)',
      2, {}, 'mblen() works on UTF-8 characters');
 }