1--TEST--
2readline_write_history(): Basic test
3--SKIPIF--
4<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip"); ?>
5--FILE--
6<?php
7
8$name = tempnam('/tmp', 'readline.tmp');
9
10readline_add_history('foo');
11readline_add_history('');
12readline_add_history(1);
13readline_add_history(NULL);
14readline_write_history($name);
15
16var_dump(file_get_contents($name));
17
18unlink($name);
19
20?>
21--EXPECT--
22string(8) "foo
23
241
25
26"
27