mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
[jsinterp] Fix undefined variable name caching (#13677)
Fix b342d27f3f
Authored by: bashonly
This commit is contained in:
parent
aa9f1f4d57
commit
805519bfaa
3 changed files with 12 additions and 2 deletions
|
|
@ -536,6 +536,11 @@ class TestJSInterpreter(unittest.TestCase):
|
|||
}
|
||||
''', 31)
|
||||
|
||||
def test_undefined_varnames(self):
|
||||
jsi = JSInterpreter('function f(){ var a; return [a, b]; }')
|
||||
self._test(jsi, [JS_Undefined, JS_Undefined])
|
||||
self.assertEqual(jsi._undefined_varnames, {'b'})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue