fix: escape file names in CLI messages

This commit is contained in:
randogoth 2026-10-24 21:57:13 +03:00
parent 78528abd3a
commit d879c6f871
2 changed files with 20 additions and 13 deletions

View file

@ -179,3 +179,10 @@ def test_cmd_list_shows_square_brackets(cwd, monkeypatch, capsys):
main()
out = capsys.readouterr().out
assert 'a [demo].mp3' in out and '[with]' in out
def test_cmd_messages_show_square_brackets_in_file_names(cwd, monkeypatch, capsys):
(cwd / 'a [demo].mp3').touch()
monkeypatch.setattr(sys, 'argv', ['otag', 'a', 'a [demo].mp3', '#lofi'])
main()
assert 'a [demo].mp3' in capsys.readouterr().out