mirror of
https://github.com/php/php-src.git
synced 2024-12-04 23:34:25 +08:00
add test for bug #74230
This commit is contained in:
parent
1f8fc0fb56
commit
6da475367a
22
ext/intl/tests/bug74230.phpt
Normal file
22
ext/intl/tests/bug74230.phpt
Normal file
@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #74230 iconv fails to fail on surrogates
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded('iconv')) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$high = "\xED\xa1\x92"; // codepoint D852
|
||||
$low = "\xED\xBD\xA2"; // codepoint DF62
|
||||
$pair = $high.$low;
|
||||
var_dump(
|
||||
@\iconv('UTF-8', 'UTF-8', $high) === false,
|
||||
@\iconv('UTF-8', 'UTF-8', $low) === false,
|
||||
@\iconv('UTF-8', 'UTF-8', $pair) === false
|
||||
);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
Loading…
Reference in New Issue
Block a user