diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-11-16 20:43:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 20:43:19 +0800 |
commit | eceba9f805e395429d1850ff2a339728c9dfed7f (patch) | |
tree | 9525e38e865d08a4b7a2f9413361f8d6f4ee8c60 /test/test_jsinterp.py | |
parent | 58355a3bf163349831b076c0fac4c09a286d5aa4 (diff) | |
parent | 95ad9ce573033006b08c4f1a440f3ff04c20d8b3 (diff) | |
download | youtube-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.py | 7 |
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() |