1--TEST--
2readline_write_history(): Basic test
3--EXTENSIONS--
4readline
5--SKIPIF--
6<?php if (!function_exists('readline_add_history')) die("skip");
7if (READLINE_LIB == "libedit") die("skip readline only");
8if (getenv('SKIP_REPEAT')) die("skip readline has global state");
9?>
10--FILE--
11<?php
12
13$name = tempnam('/tmp', 'readline.tmp');
14
15readline_add_history('foo');
16readline_add_history('');
17readline_add_history(1);
18readline_write_history($name);
19
20var_dump(file_get_contents($name));
21
22unlink($name);
23
24?>
25--EXPECT--
26string(7) "foo
27
281
29"
30