1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/readline/tests/libedit_callback_handler_install_001.phpt
David Carlier cad0ce5382 CI disable leak sanitizer on two libedit tests temporarily.
the libedit dependency has a leak on wcsdup call on ubuntu focal

close GH-15279
2024-08-07 22:38:30 +01:00

32 lines
791 B
PHP

--TEST--
readline_callback_handler_install(): Basic test
lsan disabled due to a leak on ubuntu focal only.
--EXTENSIONS--
readline
--SKIPIF--
<?php if (!function_exists('readline_callback_handler_install')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
?>
--INI--
zend.signal_check=0
--ENV--
LSAN_OPTIONS=detect_leaks=0
--FILE--
<?php
function foo() {
readline_callback_handler_remove();
}
var_dump(readline_callback_handler_install('testing: ', 'foo'));
try {
var_dump(readline_callback_handler_install('testing: ', 'foobar!'));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
bool(true)
readline_callback_handler_install(): Argument #2 ($callback) must be a valid callback, function "foobar!" not found or invalid function name