fork test

This commit is contained in:
Anatol Belski 2016-01-15 13:10:09 +01:00
parent d7a1b243da
commit e1c3df3e88
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,29 @@
--TEST--
readline_write_history(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
?>
--FILE--
<?php
$name = tempnam(sys_get_temp_dir(), 'readline.tmp');
readline_add_history('foo');
readline_add_history('');
readline_add_history(1);
readline_add_history(NULL);
readline_write_history($name);
var_dump(file_get_contents($name));
unlink($name);
?>
--EXPECT--
string(6) "foo
1
"

View File

@ -3,6 +3,9 @@ readline_write_history(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
die('skip not for windows');
}
?>
--FILE--
<?php