X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FJavaScriptMinifierTest.php;h=16048bf4334e91d8f0fadf71675cc0a942a65633;hb=be74c82f9a19f9fc5a0c771ec627b9aa9746089e;hp=3e37f15a9f8e127d3fac82e32c1e8e30274ce155;hpb=a952d5faed833210d9fe436ef4a5becd503ceb35;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php index 3e37f15a9f..16048bf433 100644 --- a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php +++ b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php @@ -165,9 +165,6 @@ class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase { ], [ "if(1)/a /g.exec('Pa ss');", "if(1)/a /g.exec('Pa ss');" ], - // newline insertion after 1000 chars: break after the "++", not before - [ str_repeat( ';', 996 ) . "if(x++);", str_repeat( ';', 996 ) . "if(x++\n);" ], - // Unicode letter characters should pass through ok in identifiers (T33187) [ "var KaŝSkatolVal = {}", 'var KaŝSkatolVal={}' ], @@ -250,9 +247,21 @@ class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase { ';', ], ], + [ + // Must not break before '++' + 'if(x++);', + [ + 'if', + '(', + 'x++', + ')', + ';', + ], + ], [ // Regression test for T201606. // Must not break between 'return' and Expression. + // Was caused by bad state after '{}' in property value. <<