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