From e5cafda07c413096a4acbd71c4b4fbf34054a093 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 1 Aug 2006 00:30:08 +0200 Subject: fix in JS compressor This fixes a problem with escaped backslashes in single and double quote strings. darcs-hash:20060731223008-7ad00-ebae61a00115b7f32c12eb9355059a1ecf467cd3.gz --- _test/cases/lib/exe/js_js_compress.test.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to '_test') diff --git a/_test/cases/lib/exe/js_js_compress.test.php b/_test/cases/lib/exe/js_js_compress.test.php index f46cbe227..20ad88210 100644 --- a/_test/cases/lib/exe/js_js_compress.test.php +++ b/_test/cases/lib/exe/js_js_compress.test.php @@ -49,6 +49,11 @@ class js_js_compress_test extends UnitTestCase { $this->assertEqual(js_compress($text), $text); } + function test_dquot2(){ + $text = 'var foo="Now what \\\\\\" \'do we//get /*here*/ ?";'; + $this->assertEqual(js_compress($text), $text); + } + function test_dquotrunaway(){ $text = 'var foo="Now where does it end'; $this->assertEqual(js_compress($text), "$text\n"); //\n is added by compressor -- cgit v1.2.3