Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/56585
Change subject: fix for interpreter ...................................................................... fix for interpreter fix syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in echo "foo is $foo\n\n"; Change-Id: I11c28d1e5c055b3d6e2d0659f33256eb4ef95a98 --- M includes/Interpreter.php M tests/phpunit/includes/InterpreterTest.php 2 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway refs/changes/85/56585/1 diff --git a/includes/Interpreter.php b/includes/Interpreter.php index 2e9ae01..97fbdcf 100644 --- a/includes/Interpreter.php +++ b/includes/Interpreter.php @@ -174,7 +174,7 @@ if( $expectCurlyClose ) { $expected = array( '}' ); } else { - $expected = array( ';' ); + $expected = array( ';', T_ENCAPSED_AND_WHITESPACE ); } if( $expectListParams ) { $expected[] = ','; diff --git a/tests/phpunit/includes/InterpreterTest.php b/tests/phpunit/includes/InterpreterTest.php index 3945b95..27cf316 100644 --- a/tests/phpunit/includes/InterpreterTest.php +++ b/tests/phpunit/includes/InterpreterTest.php @@ -46,6 +46,14 @@ 'foo is foobar' ); $this->assertEquals( + Interpreter::run('echo "foo is {$foo}.";'), + 'foo is foobar.' + ); + $this->assertEquals( + Interpreter::run('echo "foo is $foo\n\n";'), + "foo is foobar\n\n" + ); + $this->assertEquals( Interpreter::run('echo \'foo is $foo\';'), 'foo is $foo' ); -- To view, visit https://gerrit.wikimedia.org/r/56585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11c28d1e5c055b3d6e2d0659f33256eb4ef95a98 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Foxway Gerrit-Branch: master Gerrit-Owner: Pastakhov <pastak...@yandex.ru> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits