diff options
author | Karl Williamson <khw@cpan.org> | 2019-04-12 15:28:54 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-04-13 09:39:05 -0600 |
commit | 02b8575cba7653c292429c22582ddeabfa947f84 (patch) | |
tree | 6c0b10327dd53817a0d49c0a596f25d05fc8672d /ext | |
parent | ef80af0250a7497c4a20bdcec28c3a2de48d6f69 (diff) | |
download | perl-02b8575cba7653c292429c22582ddeabfa947f84.tar.gz |
Reinstate and fix failing POSIX mb.t test
Somehow I had pushed to blead a draft version of the test, rather than
the final one that actually should work. The draft is what got reverted
by 8cc54175018f1cabb5c0354371c9e2ee24f8ee5a. Reinstate the test,
corrected.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/POSIX/t/mb.t | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/POSIX/t/mb.t b/ext/POSIX/t/mb.t index 32f7f954be..25bffe16e3 100644 --- a/ext/POSIX/t/mb.t +++ b/ext/POSIX/t/mb.t @@ -19,25 +19,29 @@ BEGIN { require 'test.pl'; } -plan tests => 3; +plan tests => 4; use POSIX qw(); SKIP: { - skip("mblen() not present", 3) unless $Config{d_mblen}; + skip("mblen() not present", 4) unless $Config{d_mblen}; is(&POSIX::mblen("a", &POSIX::MB_CUR_MAX), 1, 'mblen() basically works'); - skip("LC_CTYPE locale support not available", 2) + skip("LC_CTYPE locale support not available", 3) unless locales_enabled('LC_CTYPE'); my $utf8_locale = find_utf8_ctype_locale(); - skip("no utf8 locale available", 2) unless $utf8_locale; + skip("no utf8 locale available", 3) unless $utf8_locale; local $ENV{LC_CTYPE} = $utf8_locale; local $ENV{LC_ALL}; delete $ENV{LC_ALL}; + 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("' . I8_to_native("\x{c3}\x{28}") |