summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-08-06 20:34:51 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-08-06 20:34:51 +0200
commit80a47290a7a01f2a320d09d387eea690ce1f62b4 (patch)
tree8ea12bb3b8101478b3e8f686a10bc7b62d974a9a /_test
parent63e967bdfd6d3bd52960647f8490dfd9678353f9 (diff)
downloadrpg-80a47290a7a01f2a320d09d387eea690ce1f62b4.tar.gz
rpg-80a47290a7a01f2a320d09d387eea690ce1f62b4.tar.bz2
do not recompress already minified js FS#2574
Diffstat (limited to '_test')
-rw-r--r--_test/tests/lib/exe/js_js_compress.test.php26
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