Skip to content

Commit 75410eb

Browse files
authored
Merge readline tests for POSIX and Windows (phpGH-17171)
These test cases differ only in some details, so it doesn't make much sense to have separate test cases, given that POSIX/Windows test pairs are not unlikely to diverge over time (as can be seen here, where the POSIX tests are skipped for repeat runs, but the Windows tests are not).
1 parent 7e1a241 commit 75410eb

File tree

4 files changed

+7
-91
lines changed

4 files changed

+7
-91
lines changed

ext/readline/tests/libedit_info_001-win32.phpt

Lines changed: 0 additions & 43 deletions
This file was deleted.

ext/readline/tests/libedit_info_001.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ readline_info(): Basic test
44
readline
55
--SKIPIF--
66
<?php if (READLINE_LIB != "libedit") die("skip libedit only");
7-
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
8-
die('skip not for windows');
9-
}
107
if (getenv('SKIP_REPEAT')) die("skip readline has global state");
118
?>
129
--FILE--
@@ -28,11 +25,7 @@ array(%d) {
2825
["line_buffer"]=>
2926
string(0) ""
3027
["point"]=>
31-
int(0)
32-
["end"]=>
3328
int(0)%A
34-
["library_version"]=>
35-
string(%d) "%s"
3629
["readline_name"]=>
3730
string(0) ""
3831
["attempted_completion_over"]=>

ext/readline/tests/libedit_write_history_001-win32.phpt

Lines changed: 0 additions & 30 deletions
This file was deleted.

ext/readline/tests/libedit_write_history_001.phpt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,25 @@ readline
55
--SKIPIF--
66
<?php if (!function_exists('readline_add_history')) die("skip");
77
if (READLINE_LIB != "libedit") die("skip libedit only");
8-
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
9-
die('skip not for windows');
10-
}
118
if (getenv('SKIP_REPEAT')) die("skip readline has global state");
129
?>
1310
--FILE--
1411
<?php
1512

16-
$name = tempnam('/tmp', 'readline.tmp');
13+
$name = tempnam(sys_get_temp_dir(), 'readline.tmp');
1714

1815
readline_add_history('foo');
1916
readline_add_history('');
2017
readline_add_history(1);
2118
readline_write_history($name);
2219

23-
var_dump(file_get_contents($name));
20+
echo(file_get_contents($name));
2421

2522
unlink($name);
2623

2724
?>
28-
--EXPECT--
29-
string(20) "_HiStOrY_V2_
30-
foo
31-
32-
1
33-
"
25+
--EXPECTREGEX--
26+
(_HiStOrY_V2_
27+
)?foo
28+
(
29+
)?1

0 commit comments

Comments
 (0)