Bug #70543 [Com]: Test sapi/cli/tests/016.phpt fails when readline is dynamic extension

From: Date: Mon, 21 Sep 2015 12:58:45 +0000
Subject: Bug #70543 [Com]: Test sapi/cli/tests/016.phpt fails when readline is dynamic extension
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196128@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70543&edit=1 ID: 70543 Comment by: rainer dot jung at kippdata dot de Reported by: rainer dot jung at kippdata dot de Summary: Test sapi/cli/tests/016.phpt fails when readline is dynamic extension Status: Open Type: Bug Package: CGI/CLI related Operating System: Any PHP Version: 7.0.0RC3 Block user comment: N Private report: N New Comment: 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. Expected: ... Interactive %s %Secho 'hello world'; %Shello world Actual: ... Interactive mode enabled echo 'hello world'; echo 'hello world'; It seems no other tests use the interactive mode, only these two. Previous Comments: ------------------------------------------------------------------------ [2015-09-21 09:58:24] rainer dot jung at kippdata dot de Description: ------------ 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 #if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE) printf("Interactive shell\n\n"); #else printf("Interactive mode enabled\n\n"); #endif 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'; exit 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70543&edit=1

« previous php.bugs (#196128) next »