From aa740e8a4ab4b00a207c1dfe0b10e9899af0e1db Mon Sep 17 00:00:00 2001 From: enkore Date: Sun, 4 Aug 2013 14:44:28 +0200 Subject: [PATCH] core.util.formatp: Add test case breaking it, trying to fix that. Argh. --- tests/test_core_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_core_util.py b/tests/test_core_util.py index 97d378e..b0eb36b 100644 --- a/tests/test_core_util.py +++ b/tests/test_core_util.py @@ -262,3 +262,7 @@ class FormatPTests(unittest.TestCase): assert util.formatp("ALINA[{title} schnacke]KOMMAHER", title="") == "ALINAKOMMAHER" assert util.formatp("grml[{title}]") == "grml" assert util.formatp("[{t}]grml") == "grml" + + def test_generic(self): + s = "{status} [{artist} / {album} / ]{title}[ {song_elapsed}/{song_length}]" + assert util.formatp(s, status="▷", title="Only For The Weak", song_elapsed="1:41", song_length="4:55") == "▷ Only For The Weal 1:41/4:55"