diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-06-05 13:15:56 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-06-05 13:15:56 +0200 |
commit | 6992ea08420671362032b795cd2972cfc0ef5f01 (patch) | |
tree | cdfb571369de777fffa7dbe35bed4f10ef18b2d1 /_test | |
parent | 303d4f1470333e1ba613083310ab52b886f3d68c (diff) | |
download | rpg-6992ea08420671362032b795cd2972cfc0ef5f01.tar.gz rpg-6992ea08420671362032b795cd2972cfc0ef5f01.tar.bz2 |
fixed JavaScript compressor for certain regexes
This fixes a problem with running the minified jQuery through the
compressor.
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/lib/exe/js_js_compress.test.php | 6 |
1 files changed, 6 insertions, 0 deletions
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="<div class=\'test e\'></div><div class=\'test\'></div>";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 */ |