Compare commits

..

11 Commits

Author SHA1 Message Date
dirkf
b74a0d515e
Merge 0da30320aefe3ca0c3096d197a496a2f102cf3b6 into 673277e510ebd996b62a2fcc76169bf3cce29910 2025-03-10 18:47:13 +00:00
dirkf
0da30320ae [JSInterp] Improve tests
* from yt-dlp/yt-dlp#12313
* also fix d7c2708
2025-03-10 18:27:39 +00:00
dirkf
6a8382a83e [YouTube] Update TVHTML5 client parameters
* resolves #33078
2025-03-10 18:27:39 +00:00
dirkf
5c9a987a8d [YouTube] Initially support tce-style player JS
* resolves #33079
2025-03-10 18:27:39 +00:00
dirkf
f3572dc46f [YouTube] Temporarily redirect from tce-style player JS 2025-03-10 18:27:39 +00:00
dirkf
5edaf42402 [JSInterp] Make indexing error handling more conformant
* by default TypeError -> undefined, else raise
* set allow_undefined=True/False to override
2025-03-10 18:27:39 +00:00
dirkf
086c0725f0 [JSInterp] Handle undefined, etc, passed to JS_RegExp and Exception 2025-03-10 18:27:39 +00:00
dirkf
b2820cbf4a [JSInterp] Improve Date processing
* add JS_Date class implementing JS Date
* support constructor args other than date string
* support static methods of Date
* Date objects are still automatically coerced to timestamp before using in JS.
2025-03-10 18:27:39 +00:00
dirkf
705edd3a77 [compat] Fix inheriting from compat_collections_chain_map
* see ytdl-org/youtube-dl#33079#issuecomment-2704038049
2025-03-10 18:27:39 +00:00
dirkf
1916ab7433 [compat] Support zstd Content-Encoding
* see RFC 8878 7.2
2025-03-10 18:27:39 +00:00
dirkf
15dad2d359 [compat] Clean-up
* make workaround_optparse_bug9161 private
* add comments
* avoid leaving test objects behind
2025-03-10 18:27:39 +00:00

View File

@ -501,7 +501,6 @@ class TestJSInterpreter(unittest.TestCase):
self._test('function f(){return 0.0 << NaN}', 0)
self._test('function f(){return null << undefined}', 0)
def test_negative(self):
self._test('function f(){return 2 * -2.0 ;}', -4)
self._test('function f(){return 2 - - -2 ;}', 0)