summaryrefslogtreecommitdiff
path: root/ext/POSIX/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-03 22:10:43 -0700
committerKarl Williamson <khw@cpan.org>2020-02-19 22:09:48 -0700
commit63bebc1439c3a3eefd310e674f2593ff60cceca4 (patch)
treed02f41c83a701f8a16bb87c9dab4343626506cb8 /ext/POSIX/t
parentd2c9cb5392e8c58c3bb1935fc3c098737224567c (diff)
downloadperl-63bebc1439c3a3eefd310e674f2593ff60cceca4.tar.gz
POSIX::mblen: Make length parameter optional
Now that the typemap is an SV, we can access the length from that.
Diffstat (limited to 'ext/POSIX/t')
-rw-r--r--ext/POSIX/t/mb.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/POSIX/t/mb.t b/ext/POSIX/t/mb.t
index 629f4776de..b8a887d8ce 100644
--- a/ext/POSIX/t/mb.t
+++ b/ext/POSIX/t/mb.t
@@ -19,14 +19,16 @@ BEGIN {
require 'test.pl';
}
-plan tests => 5;
+plan tests => 6;
+
use POSIX qw();
SKIP: {
- skip("mblen() not present", 6) unless $Config{d_mblen};
+ skip("mblen() not present", 7) unless $Config{d_mblen};
- is(&POSIX::mblen("a", &POSIX::MB_CUR_MAX), 1, 'mblen() basically works');
+ is(&POSIX::mblen("a", &POSIX::MB_CUR_MAX), 1, 'mblen() works on ASCII input');
+ is(&POSIX::mblen("b"), 1, '... and the 2nd parameter is optional');
skip("LC_CTYPE locale support not available", 4)
unless locales_enabled('LC_CTYPE');