1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/ext/mbstring/tests/bug69151.phpt
Christoph M. Becker a003af5b62 Add missing skip conditions
mbstring can be built without mbregex support, in which case these
tests would fail.  Thus we add respective skip conditions.
2018-08-05 00:01:35 +02:00

25 lines
538 B
PHP

--TEST--
Bug #69151 (mb_ereg should reject ill-formed byte sequence)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--
<?php
$str = "\x80";
var_dump(
false === mb_eregi('.', $str, $matches),
[] === $matches,
NULL === mb_ereg_replace('.', "\\0", $str),
false === mb_ereg_search_init("\x80", '.'),
false === mb_ereg_search()
);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)