From: Timo Tijhof Date: Sat, 11 Aug 2018 23:24:56 +0000 (+0100) Subject: JavaScriptMinifier: Add test case for another line-break bug X-Git-Tag: 1.34.0-rc.0~4476^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=92ce940ec32b6af792ec6b5f4b8cd81080868307 JavaScriptMinifier: Add test case for another line-break bug Discovered by adding a test case that uses file_get_contents() to pass jquery.js, and then scan the PHPUnit output for an entry containing `return` by itself on a line where the next line is isn't `;` - then reducing it to a test case as small as possible. This was reduced from the definition of jQuery.event.addProp. Bug: T201606 Change-Id: I1f907436c32630102e60e3ded7092dbeb9669fe8 --- diff --git a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php index ce8bb06abc..16048bf433 100644 --- a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php +++ b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php @@ -261,6 +261,7 @@ class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase { [ // Regression test for T201606. // Must not break between 'return' and Expression. + // Was caused by bad state after '{}' in property value. <<