1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-02 03:52:55 -05:00

[jsinterp] Fix for youtube player c81bbb4a

This commit is contained in:
pukkandan
2022-08-16 06:53:45 +05:30
parent 5c6d2ef9d1
commit 6d3e7424bf
3 changed files with 24 additions and 15 deletions

View File

@ -212,6 +212,11 @@ class TestJSInterpreter(unittest.TestCase):
''')
self.assertEqual(jsi.call_function('x'), 7)
jsi = JSInterpreter('''
function x() { return (l=[0,1,2,3], function(a, b){return a+b})((l[1], l[2]), l[3]) }
''')
self.assertEqual(jsi.call_function('x'), 5)
def test_void(self):
jsi = JSInterpreter('''
function x() { return void 42; }