php-src/ext/mbstring/tests/empty_pattern.phpt
Nikita Popov 39131219e8
Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00

29 lines
494 B
PHP

--TEST--
Check for empty pattern
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--
<?php
try {
mb_ereg_search_init("","","");
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
mb_split("","");
try {
mb_ereg_search_regs();
} catch (\Error $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
mb_ereg_search_init(): Argument #2 ($pattern) must not be empty
No pattern was provided