https://bugzilla.wikimedia.org/show_bug.cgi?id=28626
--- Comment #22 from Brion Vibber <br...@wikimedia.org> 2011-07-06 19:04:07 UTC --- Created attachment 8752 --> https://bugzilla.wikimedia.org/attachment.cgi?id=8752 Quick patch adding jsmin+ and running its JS parser on JavaScriptMinifier test case results This quick patch adds jsminplus.php into libs/, makes it and its JSParser available via autoloader, and calls the parser on post-minified JS bits in JavaScriptMinifierTest. Unfortunately many of the test cases don't appear to be valid in the first place... ..EE.E....E.EE................E......................... Time: 0 seconds, Memory: 23.50Mb There were 7 errors: 1) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #2 ('\' Foo \\\' bar \\ baz \\\' quox \' .', '\' Foo \\\' bar \\ baz \\\' quox \'.') Exception: Parse error: Unexpected token; token 3 expected in file 'minify-test.js' on line 1 2) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #3 ('\\" Foo \\" bar \\\\n baz \\" quox " .', '\\" Foo \\" bar \\\\n baz \\" quox ".') Exception: Parse error: Illegal token in file 'minify-test.js' on line 1 3) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #5 ('/ Foo \\/ bar [ / \\] / ] baz / .', '/ Foo \\/ bar [ / \\] / ] baz /.') Exception: Parse error: Unexpected token; token 3 expected in file 'minify-test.js' on line 1 4) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #10 ('return x;', 'return x;') Exception: Parse error: Invalid return in file 'minify-test.js' on line 1 5) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #12 ('continue x;', 'continue x;') Exception: Parse error: Invalid continue in file 'minify-test.js' on line 1 6) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #13 ('break x;', 'break x;') Exception: Parse error: Invalid break in file 'minify-test.js' on line 1 7) JavaScriptMinifierTest::testJavaScriptMinifierOutput with data set #30 ('return/ x/g', 'return/ x/g') Exception: Parse error: Invalid return in file 'minify-test.js' on line 1 The return/continue/break bits appear to be problematic because they don't appear in a legitimate context (return must be in a function, continue/break must be in a looping construct). The quoted strings... ugh I haven't tried to decipher those yet. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l