diff options
Diffstat (limited to '_test/tests')
-rw-r--r-- | _test/tests/lib/exe/js_js_compress.test.php | 60 |
1 files changed, 60 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 b1ae2a84f..78e089d89 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -145,6 +145,66 @@ EOF; $this->assertEquals($out, js_compress($text)); } + function test_plusplus1(){ + $text = 'a = 5 + ++b;'; + $this->assertEquals('a=5+ ++b;',js_compress($text)); + } + + function test_plusplus2(){ + $text = 'a = 5+ ++b;'; + $this->assertEquals('a=5+ ++b;',js_compress($text)); + } + + function test_plusplus3(){ + $text = 'a = 5++ + b;'; + $this->assertEquals('a=5++ +b;',js_compress($text)); + } + + function test_plusplus4(){ + $text = 'a = 5++ +b;'; + $this->assertEquals('a=5++ +b;',js_compress($text)); + } + + function test_minusminus1(){ + $text = 'a = 5 - --b;'; + $this->assertEquals('a=5- --b;',js_compress($text)); + } + + function test_minusminus2(){ + $text = 'a = 5- --b;'; + $this->assertEquals('a=5- --b;',js_compress($text)); + } + + function test_minusminus3(){ + $text = 'a = 5-- - b;'; + $this->assertEquals('a=5-- -b;',js_compress($text)); + } + + function test_minusminus4(){ + $text = 'a = 5-- -b;'; + $this->assertEquals('a=5-- -b;',js_compress($text)); + } + + function test_minusplus1(){ + $text = 'a = 5-- +b;'; + $this->assertEquals('a=5--+b;',js_compress($text)); + } + + function test_minusplus2(){ + $text = 'a = 5-- + b;'; + $this->assertEquals('a=5--+b;',js_compress($text)); + } + + function test_plusminus1(){ + $text = 'a = 5++ - b;'; + $this->assertEquals('a=5++-b;',js_compress($text)); + } + + function test_plusminus2(){ + $text = 'a = 5++ -b;'; + $this->assertEquals('a=5++-b;',js_compress($text)); + } + /** * Test the files provided with the original JsStrip */ |