mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Add test
This commit is contained in:
parent
55ef006b3e
commit
8db661b115
1 changed files with 14 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue