aboutsummaryrefslogtreecommitdiff
path: root/test/test_jsinterp.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-11-16 20:43:19 +0800
committerGitHub <noreply@github.com>2016-11-16 20:43:19 +0800
commiteceba9f805e395429d1850ff2a339728c9dfed7f (patch)
tree9525e38e865d08a4b7a2f9413361f8d6f4ee8c60 /test/test_jsinterp.py
parent58355a3bf163349831b076c0fac4c09a286d5aa4 (diff)
parent95ad9ce573033006b08c4f1a440f3ff04c20d8b3 (diff)
downloadyoutube-dl-eceba9f805e395429d1850ff2a339728c9dfed7f.tar.xz
Merge pull request #11122 from kasper93/openload
[openload] Fix extraction.
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r--test/test_jsinterp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index 63c350b8f..a9abae5f5 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -104,6 +104,13 @@ class TestJSInterpreter(unittest.TestCase):
}''')
self.assertEqual(jsi.call_function('x'), [20, 20, 30, 40, 50])
+ def test_call(self):
+ jsi = JSInterpreter('''
+ function x() { return 2; }
+ function y(a) { return x() + a; }
+ function z() { return y(3); }
+ ''')
+ self.assertEqual(jsi.call_function('z'), 5)
if __name__ == '__main__':
unittest.main()