mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
[jsinterp] Fix for youtube player c81bbb4a
This commit is contained in:
parent
5c6d2ef9d1
commit
6d3e7424bf
3 changed files with 24 additions and 15 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue