Add tests for for trunc formatting

This commit is contained in:
sentriz
2021-02-15 23:26:02 +00:00
parent 7cc7bc5463
commit 1bf2887a58

View File

@@ -114,6 +114,10 @@ async def test_format(bus_address):
test.add(' {{lc(album)}} ', album.lower())
test.add('{{playerName}} - {{playerInstance}}',
f'{player_name} - {player_instance}')
test.add("{{trunc(title, 10)}}", title)
test.add("{{trunc(title, 5)}}", f"{title[:5]}")
test.add('{{trunc("", 0)}}', "")
test.add('{{trunc("", 10)}}', "")
await test.run()