From 6992ea08420671362032b795cd2972cfc0ef5f01 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 13:15:56 +0200 Subject: fixed JavaScript compressor for certain regexes This fixes a problem with running the minified jQuery through the compressor. --- _test/cases/lib/exe/js_js_compress.test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '_test') diff --git a/_test/cases/lib/exe/js_js_compress.test.php b/_test/cases/lib/exe/js_js_compress.test.php index 76b51e5ab..4702d35d3 100644 --- a/_test/cases/lib/exe/js_js_compress.test.php +++ b/_test/cases/lib/exe/js_js_compress.test.php @@ -105,6 +105,12 @@ class js_js_compress_test extends UnitTestCase { } + function test_complexminified(){ + $text = 'if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;foo="text/*";bla="*/"'; + + $this->assertEqual(js_compress($text),$text); + } + /** * Test the files provided with the original JsStrip */ -- cgit v1.2.3