aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-08-16 06:53:45 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-08-16 06:53:45 +0530
commit6d3e7424bfe8cfdbd5931a37519ca7faafff642d (patch)
tree78437829e64e48686fa5500345b7661da13d2309 /test
parent5c6d2ef9d1001508407d7825d731013f3cb99f5f (diff)
downloadhypervideo-pre-6d3e7424bfe8cfdbd5931a37519ca7faafff642d.tar.lz
hypervideo-pre-6d3e7424bfe8cfdbd5931a37519ca7faafff642d.tar.xz
hypervideo-pre-6d3e7424bfe8cfdbd5931a37519ca7faafff642d.zip
[jsinterp] Fix for youtube player c81bbb4a
Diffstat (limited to 'test')
-rw-r--r--test/test_jsinterp.py5
-rw-r--r--test/test_youtube_signature.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index c97f6dcfb..665af4668 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -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; }
diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py
index 79bbfc323..0ac4fd602 100644
--- a/test/test_youtube_signature.py
+++ b/test/test_youtube_signature.py
@@ -102,6 +102,10 @@ _NSIG_TESTS = [
'https://www.youtube.com/s/player/4c3f79c5/player_ias.vflset/en_US/base.js',
'TDCstCG66tEAO5pR9o', 'dbxNtZ14c-yWyw',
),
+ (
+ 'https://www.youtube.com/s/player/c81bbb4a/player_ias.vflset/en_US/base.js',
+ 'gre3EcLurNY2vqp94', 'Z9DfGxWP115WTg',
+ ),
]