From 1c14574e858963fcd22c4a9a4a660d06a194f5cb Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Fri, 3 Jan 2025 00:38:10 +0100 Subject: [PATCH] Add lastgenre testcase with unicode \0 separator --- test/plugins/test_lastgenre.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/plugins/test_lastgenre.py b/test/plugins/test_lastgenre.py index caef1b11e..17107a65c 100644 --- a/test/plugins/test_lastgenre.py +++ b/test/plugins/test_lastgenre.py @@ -378,6 +378,21 @@ class LastGenrePluginTest(BeetsTestCase): }, ("Allowed Genre", "original"), ), + # 13 - test with a null charachter as separator + ( + { + "force": True, + "keep_allowed": True, + "source": "album", + "whitelist": True, + "separator": "\u0000" + }, + "allowed genre", + { + "album": "another allowed genre", + }, + ("allowed genre\u0000another allowed genre", "keep + album"), + ), ], ) def test_get_genre(config_values, item_genre, mock_genres, expected_result):