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