|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70543 Test sapi/cli/tests/016.phpt fails when readline is dynamic extension
Submitted: 2015-09-21 09:58 UTC Modified: 2018-03-09 13:44 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: rainer dot jung at kippdata dot de Assigned:
Status: Open Package: Testing related
PHP Version: 7.0.0RC3 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
19 + 5 = ?
Subscribe to this entry?

 [2015-09-21 09:58 UTC] rainer dot jung at kippdata dot de
Test sapi/cli/tests/016.phpt fails when either readline is build as a dynamically loadable extension. One reason is that the test expects in the output the string "Interactive shell", but due to the following code

                        printf("Interactive shell\n\n");
                        printf("Interactive mode enabled\n\n");

in sapi/cli/php_cli.c the test actually prints "Interactive mode enabled".

There are output deltas, mostly due to the fact, that the test expects more output from running the snippets.

Example expected for snippet1:

Snippet no. 1:
Interactive shell

php > echo 'Hello world';
Hello world
php > exit

Actually for snippet 1:

Snippet no. 1:
Interactive mode enabled

echo 'Hello world';

Either we disable the test when the readline extension is dynamically loaded, or the output which we test against must be modified. Unfortuanetyl as the test currently is designed, in the dynamic extension case the remaining output doesn't provide much test coverage.

The problem happens for the latest 5.4-5.6 releases and for 7RC3.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-21 12:58 UTC] rainer dot jung at kippdata dot de
There is exactly one other test that also suffers from interactive mode problems with dynamically loaded readline: sapi/cli/tests/bug64529.phpt.

In that test the problem with the interactive heading is fixed using the expactation pattern "Interactive %s", but the rest of the test output still does not match the expectation.


Interactive %s

%Secho 'hello world';
%Shello world


Interactive mode enabled

echo 'hello world';
echo 'hello world';

It seems no other tests use the interactive mode, only these two.
 [2018-03-09 13:44 UTC]
-Package: CGI/CLI related +Package: Testing related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 14:01:33 2024 UTC