mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-14 02:27:42 -07:00
[jsinterp] Small updates for a85a875
* update signature tests * clarify NaN handling
This commit is contained in:
parent
d1c6c5c4d6
commit
d89c2137ba
3 changed files with 16 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue