summaryrefslogtreecommitdiff
path: root/_test/tests/lib/exe/js_js_compress.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_test/tests/lib/exe/js_js_compress.test.php')
-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