aboutsummaryrefslogtreecommitdiff
path: root/test/test_jsinterp.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-05-19 13:09:18 +0100
committerdirkf <fieldhouse@gmx.net>2023-05-23 16:50:25 +0100
commitd89c2137ba4c1def185358a9ff48642e05ac65a2 (patch)
treee46ecc14fa3ae45233cb037f1ac3abb108607615 /test/test_jsinterp.py
parentd1c6c5c4d618fa950813c0c71aede34a5ac851e9 (diff)
downloadyoutube-dl-d89c2137ba4c1def185358a9ff48642e05ac65a2.tar.xz
[jsinterp] Small updates for a85a875
* update signature tests * clarify NaN handling
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r--test/test_jsinterp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index a8f312fde..1cc148b15 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -516,6 +516,9 @@ class TestJSInterpreter(unittest.TestCase):
jsi = JSInterpreter('function x(){return 42 << NaN}')
self.assertEqual(jsi.call_function('x'), 42)
+ jsi = JSInterpreter('function x(){return 42 << Infinity}')
+ self.assertEqual(jsi.call_function('x'), 42)
+
def test_32066(self):
jsi = JSInterpreter("function x(){return Math.pow(3, 5) + new Date('1970-01-01T08:01:42.000+08:00') / 1000 * -239 - -24205;}")
self.assertEqual(jsi.call_function('x'), 70)