diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-05-04 15:12:37 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-05-04 15:12:37 +0200 |
commit | ca53ac989366b6c0519b74dc7152cb5e68c6bbad (patch) | |
tree | 2b81310dffaa1055374c1d3b5c7701dde7d0d732 /_test/tests | |
parent | 55ce110126c81c7f7c821183fab3018cacc40016 (diff) | |
download | rpg-ca53ac989366b6c0519b74dc7152cb5e68c6bbad.tar.gz rpg-ca53ac989366b6c0519b74dc7152cb5e68c6bbad.tar.bz2 |
Correctly handle multiline strings in JS compressor
See
http://stackoverflow.com/questions/805107/how-to-create-multiline-strings
for info on them.
Diffstat (limited to '_test/tests')
-rw-r--r-- | _test/tests/lib/exe/js_js_compress.test.php | 11 |
1 files changed, 11 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 cda05162d..aa8d82933 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -110,6 +110,17 @@ class js_js_compress_test extends DokuWikiTest { $this->assertEquals(js_compress($text),$text); } + function test_multilinestring(){ + $text = 'var foo = "this is a \\ +multiline string";'; + $this->assertEquals('var foo="this is a multiline string";',js_compress($text)); + + $text = "var foo = 'this is a \\ +multiline string';"; + $this->assertEquals("var foo='this is a multiline string';",js_compress($text)); + } + + /** * Test the files provided with the original JsStrip */ |