aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_postprocessors.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_postprocessors.py b/test/test_postprocessors.py
index 12fc427fb..7574a0b95 100644
--- a/test/test_postprocessors.py
+++ b/test/test_postprocessors.py
@@ -16,6 +16,15 @@ class TestMetadataFromField(unittest.TestCase):
pp = MetadataFromFieldPP(None, ['title:%(title)s - %(artist)s'])
self.assertEqual(pp._data[0]['regex'], r'(?P<title>.+)\ \-\ (?P<artist>.+)')
+ def test_field_to_outtmpl(self):
+ pp = MetadataFromFieldPP(None, ['title:%(title)s : %(artist)s'])
+ self.assertEqual(pp._data[0]['tmpl'], '%(title)s')
+
+ def test_in_out_seperation(self):
+ pp = MetadataFromFieldPP(None, ['%(title)s \\: %(artist)s:%(title)s : %(artist)s'])
+ self.assertEqual(pp._data[0]['in'], '%(title)s : %(artist)s')
+ self.assertEqual(pp._data[0]['out'], '%(title)s : %(artist)s')
+
class TestMetadataFromTitle(unittest.TestCase):
def test_format_to_regex(self):