Re: com php-src: readline - add basic test: ext/readline/tests/readline_basic.phpt
| From: | Peter Kokot | Date: | Sat, 09 Feb 2019 22:47:38 +0000 |
| Subject: | Re: com php-src: readline - add basic test: ext/readline/tests/readline_basic.phpt | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-104507@lists.php.net to get a copy of this message | ||
Hello,
On Sat, 9 Feb 2019 at 10:07, Nikita Popov <nikita.ppv@gmail.com> wrote:
>
> On Sat, Feb 9, 2019 at 1:23 AM Peter Kokot <petk@php.net> wrote:
>>
>> Commit: 0506c0224a485812e7f675cb808432f5f98a4412
>> Author: Joel Clermont <jclermont@gmail.com> Tue, 12 Sep 2017 19:39:47
>> -0500
>> Committer: Peter Kokot <peterkokot@gmail.com> Sat, 9 Feb 2019 01:21:52 +0100
>> Parents: dc1937e386082dddbcab612889ad8cb15df88b73
>> Branches: PHP-7.4 master
>>
>> Link:
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=0506c0224a485812e7f675cb808432f5f98a4412
>>
>> Log:
>> readline - add basic test
>>
>> Changed paths:
>> A ext/readline/tests/readline_basic.phpt
>>
>>
>> Diff:
>> diff --git a/ext/readline/tests/readline_basic.phpt
>> b/ext/readline/tests/readline_basic.phpt
>> new file mode 100644
>> index 0000000..aae3002
>> --- /dev/null
>> +++ b/ext/readline/tests/readline_basic.phpt
>> @@ -0,0 +1,18 @@
>> +--TEST--
>> +readline(): Basic test
>> +--CREDITS--
>> +Milwaukee PHP User Group
>> +#PHPTestFest2017
>> +--SKIPIF--
>> +<?php if (!extension_loaded("readline")) die("skip"); ?>
>> +--FILE--
>> +<?php
>> +
>> +var_dump(readline('Enter some text:'));
>> +
>> +?>
>> +--STDIN--
>> +I love PHP
>> +--EXPECTF--
>> +Enter some text:I love PHP
>> +string(10) "I love PHP"
>
>
> This test fails on Windows, see for example
>https://ci.appveyor.com/project/php/php-src/builds/22240878/job/bmq33hd9oc24f95x.
>
> Nikita
Thanks for this reminder. This should be now fixed via
http://git.php.net/?p=php-src.git;a=commit;h=4ae5691a60a4aaae86776205b3e938a8fecc66a7
If some better patch comes up I'll check it out. Case is that this
happens on some installations/systems and combinations of readline. On
Linux it works ok but on MacOS and Windows it doesn't capture the
STDIN in the test output for some reason.
--
Peter Kokot