1--TEST--
2readline_read_history(): Basic test
3--EXTENSIONS--
4readline
5--SKIPIF--
6<?php
7if (!function_exists('readline_list_history')) die("skip");
8if (getenv('SKIP_REPEAT')) die("skip readline has global state");
9?>
10--FILE--
11<?php
12
13$name = tempnam(sys_get_temp_dir(), 'readline.tmp');
14
15readline_add_history("foo");
16
17var_dump(readline_write_history($name));
18
19var_dump(readline_clear_history());
20
21var_dump(readline_read_history($name));
22
23var_dump(readline_list_history());
24
25unlink($name);
26
27?>
28--EXPECT--
29bool(true)
30bool(true)
31bool(true)
32array(1) {
33  [0]=>
34  string(3) "foo"
35}
36