1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 06:35:42 +07:00

Provide guidance when called with a YouTube ID starting with a dash.

Reported at https://news.ycombinator.com/item?id=8648121
This commit is contained in:
Philipp Hagemeister
2014-11-23 10:49:19 +01:00
parent d37cab2a9d
commit 7d4111ed14
5 changed files with 41 additions and 4 deletions

View File

@@ -47,6 +47,7 @@
js_to_json,
get_filesystem_encoding,
intlist_to_bytes,
args_to_str,
)
@@ -361,5 +362,11 @@ def test_intlist_to_bytes(self):
intlist_to_bytes([0, 1, 127, 128, 255]),
b'\x00\x01\x7f\x80\xff')
def test_args_to_str(self):
self.assertEqual(
args_to_str(['foo', 'ba/r', '-baz', '2 be', '']),
'foo ba/r -baz \'2 be\' \'\''
)
if __name__ == '__main__':
unittest.main()