summaryrefslogtreecommitdiff
path: root/ext/readline/tests/libedit_info_001.phpt
blob: 8b6fb80671914f562bb8bf07ddfd022e3d55a3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--TEST--
readline_info(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline")) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
    die('skip not for windows');
}
if (getenv('SKIP_REPEAT')) die("skip readline has global state");
?>
--FILE--
<?php

var_dump(readline_info());
var_dump(readline_info(1));
var_dump(readline_info(1,1));
var_dump(readline_info('line_buffer'));
var_dump(readline_info('readline_name'));
var_dump(readline_info('readline_name', 1));
var_dump(readline_info('readline_name'));
var_dump(readline_info('attempted_completion_over',1));
var_dump(readline_info('attempted_completion_over'));

?>
--EXPECTF--
array(6) {
  ["line_buffer"]=>
  string(0) ""
  ["point"]=>
  int(0)
  ["end"]=>
  int(0)
  ["library_version"]=>
  string(%d) "%s"
  ["readline_name"]=>
  string(0) ""
  ["attempted_completion_over"]=>
  int(0)
}
NULL
NULL
string(0) ""
string(0) ""
string(0) ""
string(1) "1"
int(0)
int(1)