com php-src: add test for bug #74230: ext/intl/tests/bug74230.phpt

From: Date: Mon, 27 Mar 2017 17:33:51 +0000
Subject: com php-src: add test for bug #74230: ext/intl/tests/bug74230.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-97412@lists.php.net to get a copy of this message
Commit: 6da475367a9932147a0adc3c5ed7a9d9e26f011a Author: Anatol Belski <ab@php.net> Mon, 27 Mar 2017 19:33:51 +0200 Parents: 1f8fc0fb5618af498fd55f7c594ef9ff4b8013d9 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6da475367a9932147a0adc3c5ed7a9d9e26f011a Log: add test for bug #74230 Bugs: https://bugs.php.net/74230 Changed paths: A ext/intl/tests/bug74230.phpt Diff: diff --git a/ext/intl/tests/bug74230.phpt b/ext/intl/tests/bug74230.phpt new file mode 100644 index 0000000..70ef6ae --- /dev/null +++ b/ext/intl/tests/bug74230.phpt @@ -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) +

« previous php.cvs (#97412) next »