Commits

Waldemar Kornewald committed 6c8f81a

added a failing unit test for ifexprs

  • Participants
  • Parent commits 19fee84

Comments (0)

Files changed (1)

File pyvascript/tests.py

         }
         """)
 
+    def test_ifexpr(self):
+        self.check("""
+        def f():
+            a = 5
+            b = 'gaga' if a == 5 else 'gugu'
+        """, """
+        f = function() {
+          var a, b;
+          a = 5;
+          b = ((a == 5) ? 'gaga' : 'gugu');
+        };
+        """)
+
     def test_while(self):
         self.check("""
         while a == 3 or b is None and c == True or d != False: