From 8db661b115044ccdd9ccb51c8662a8f7f8b1d513 Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Wed, 16 Jul 2025 21:41:29 +0200 Subject: [PATCH] Add test --- test/test_plugins.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_plugins.py b/test/test_plugins.py index 207522430..d9da17e61 100644 --- a/test/test_plugins.py +++ b/test/test_plugins.py @@ -94,6 +94,20 @@ class ItemTypesTest(PluginLoaderTestCase): out = self.run_with_output("ls", "rating:3..5") assert "aaa" not in out + def test_multi_value_flex_field_type(self): + class MultiValuePlugin(plugins.BeetsPlugin): + item_types = {"multi_value": types.MULTI_VALUE_DSV} + + self.register_plugin(MultiValuePlugin) + + item = Item(path="apath", artist="aaa") + item.multi_value = ["one", "two", "three"] + item.add(self.lib) + + out = self.run_with_output("ls", "-f", "$multi_value") + delimiter = types.MULTI_VALUE_DSV.delimiter + assert out == f"one{delimiter}two{delimiter}three\n" + class ItemWriteTest(PluginLoaderTestCase): def setUp(self):