diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-08-06 20:34:51 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-08-06 20:34:51 +0200 |
commit | 80a47290a7a01f2a320d09d387eea690ce1f62b4 (patch) | |
tree | 8ea12bb3b8101478b3e8f686a10bc7b62d974a9a /_test/tests | |
parent | 63e967bdfd6d3bd52960647f8490dfd9678353f9 (diff) | |
download | rpg-80a47290a7a01f2a320d09d387eea690ce1f62b4.tar.gz rpg-80a47290a7a01f2a320d09d387eea690ce1f62b4.tar.bz2 |
do not recompress already minified js FS#2574
Diffstat (limited to '_test/tests')
-rw-r--r-- | _test/tests/lib/exe/js_js_compress.test.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/_test/tests/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php index 49f93cc54..b1ae2a84f 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -118,6 +118,32 @@ class js_js_compress_test extends DokuWikiTest { $this->assertEquals("var foo='this is a multiline string';",js_compress($text)); } + function test_nocompress(){ + $text = <<<EOF +var meh = 'test' ; + +/* BEGIN NOCOMPRESS */ + + +var foo = 'test' ; + +var bar = 'test' ; + + +/* END NOCOMPRESS */ + +var moh = 'test' ; +EOF; + $out = <<<EOF +var meh='test'; +var foo = 'test' ; + +var bar = 'test' ; +var moh='test'; +EOF; + + $this->assertEquals($out, js_compress($text)); + } /** * Test the files provided with the original JsStrip |