1--TEST--
2readline_info(): Basic test
3--SKIPIF--
4<?php if (!extension_loaded("readline")) die("skip");
5if (READLINE_LIB == "libedit") die("skip readline only");
6?>
7--FILE--
8<?php
9
10var_dump(readline_info());
11var_dump(readline_info(1));
12var_dump(readline_info(1,1));
13var_dump(readline_info('line_buffer'));
14var_dump(readline_info('readline_name'));
15var_dump(readline_info('readline_name', 1));
16var_dump(readline_info('readline_name'));
17var_dump(readline_info('attempted_completion_over',1));
18var_dump(readline_info('attempted_completion_over'));
19var_dump(readline_info('completion_append_character', "\0"));
20var_dump(readline_info('completion_append_character'));
21var_dump(readline_info('completion_suppress_append', true));
22var_dump(readline_info('completion_suppress_append'));
23
24?>
25--EXPECTF--
26array(13) {
27  ["line_buffer"]=>
28  string(0) ""
29  ["point"]=>
30  int(0)
31  ["end"]=>
32  int(0)
33  ["mark"]=>
34  int(0)
35  ["done"]=>
36  int(0)
37  ["pending_input"]=>
38  int(0)
39  ["prompt"]=>
40  string(0) ""
41  ["terminal_name"]=>
42  string(0) ""
43  ["completion_append_character"]=>
44  string(1) " "
45  ["completion_suppress_append"]=>
46  bool(false)
47  ["library_version"]=>
48  string(%d) "%s"
49  ["readline_name"]=>
50  string(5) "other"
51  ["attempted_completion_over"]=>
52  int(0)
53}
54NULL
55NULL
56string(0) ""
57string(5) "other"
58string(5) "other"
59string(1) "1"
60int(0)
61int(1)
62string(1) " "
63string(0) ""
64bool(false)
65bool(true)
66