[Pkg-javascript-commits] [uglifyjs] 16/26: Added a test for else if

Jonas Smedegaard dr at jones.dk
Tue May 19 00:02:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.16
in repository uglifyjs.

commit 7971ed33d13d33ad2b1ebf1ddcc57c466b819514
Author: Tal Ater <tal at talater.com>
Date:   Wed Sep 3 01:35:30 2014 +0300

    Added a test for else if
---
 test/compress/conditionals.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js
index b023403..c244dc8 100644
--- a/test/compress/conditionals.js
+++ b/test/compress/conditionals.js
@@ -246,6 +246,14 @@ cond_7: {
             x = 2;
         }
 
+        if (y) {
+            x = 1+1;
+        } else if (z) {
+            x = 2;
+        } else {
+            x = 3-1;
+        }
+
         x = y ? 'foo' : 'fo'+'o';
 
         x = y ? 'foo' : y ? 'foo' : 'fo'+'o';
@@ -267,6 +275,7 @@ cond_7: {
     }
     expect: {
         x = 2;
+        x = 2;
         x = 'foo';
         x = 'foo';
         x = y ? a : b;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list