aboutsummaryrefslogtreecommitdiff
path: root/test/test_jsinterp.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2024-06-19 21:44:27 +0100
committerdirkf <fieldhouse@gmx.net>2024-06-20 20:03:49 +0100
commitad01fa6ccadd1ecade8002e937492a141d3b8f25 (patch)
tree11ba00027ff2204d07da12acd7d202a6002e2fd6 /test/test_jsinterp.py
parent2eac0fa3799b3d027148341186a52fb5a6288473 (diff)
[jsinterp] Add Debugger from yt-dlp
* https://github.com/yt-dlp/yt-dlp/commit/8f53dc4 * thx pukkandan
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r--test/test_jsinterp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index 91b12f544..da8e98020 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -577,9 +577,11 @@ class TestJSInterpreter(unittest.TestCase):
def test_unary_operators(self):
jsi = JSInterpreter('function f(){return 2 - - - 2;}')
self.assertEqual(jsi.call_function('f'), 0)
- # fails
- # jsi = JSInterpreter('function f(){return 2 + - + - - 2;}')
- # self.assertEqual(jsi.call_function('f'), 0)
+ jsi = JSInterpreter('function f(){return 2 + - + - - 2;}')
+ self.assertEqual(jsi.call_function('f'), 0)
+ # https://github.com/ytdl-org/youtube-dl/issues/32815
+ jsi = JSInterpreter('function f(){return 0 - 7 * - 6;}')
+ self.assertEqual(jsi.call_function('f'), 42)
""" # fails so far
def test_packed(self):