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