diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-18 22:01:49 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-18 22:10:36 +0100 |
commit | dbde19516d139ef4237fc56ac1a14665a9f13c0b (patch) | |
tree | 24eeaeb461811abc2fa36561ae01d8aabb1524eb /ext/XS-APItest | |
parent | 01ea242be7d23d3bfac7a37c0cdfaec0a8eb7e33 (diff) | |
download | perl-dbde19516d139ef4237fc56ac1a14665a9f13c0b.tar.gz |
utf16_to_utf8() should croak on encountering a bare low surrogate.
Diffstat (limited to 'ext/XS-APItest')
-rw-r--r-- | ext/XS-APItest/t/utf16_to_utf8.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/XS-APItest/t/utf16_to_utf8.t b/ext/XS-APItest/t/utf16_to_utf8.t index 3f6f798a32..5e6c58acf5 100644 --- a/ext/XS-APItest/t/utf16_to_utf8.t +++ b/ext/XS-APItest/t/utf16_to_utf8.t @@ -34,6 +34,9 @@ is($got, undef, 'hence eval returns undef'); for (["\xD8\0\0\0", 'NULs'], ["\xD8\0\xD8\0", '2 Lows'], + ["\xDC\0\0\0", 'High NUL'], + ["\xDC\0\xD8\0", 'High Low'], + ["\xDC\0\xDC\0", 'High High'], ) { my ($malformed, $name) = @$_; $got = eval {utf16_to_utf8($malformed)}; |