1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/readline/tests/libedit_write_history_001.phpt
Christoph M. Becker aff044857f Drop superfluous readline test skip conditions
The `--EXTENSIONS--` section already ensures that ext/readline is
available, so there's no need to additionally check for unconditionally
available readline functions.

Closes GH-17170.
2024-12-16 14:31:28 +01:00

30 lines
489 B
PHP

--TEST--
readline_write_history(): Basic test
--EXTENSIONS--
readline
--SKIPIF--
<?php
if (READLINE_LIB != "libedit") die("skip libedit only");
if (getenv('SKIP_REPEAT')) die("skip readline has global state");
?>
--FILE--
<?php
$name = tempnam(sys_get_temp_dir(), 'readline.tmp');
readline_add_history('foo');
readline_add_history('');
readline_add_history(1);
readline_write_history($name);
echo(file_get_contents($name));
unlink($name);
?>
--EXPECTREGEX--
(_HiStOrY_V2_
)?foo
(
)?1