diff --git a/test/test_content/customzipped.control b/test/test_content/customzipped.control new file mode 100644 index 00000000..6d3fd533 --- /dev/null +++ b/test/test_content/customzipped.control @@ -0,0 +1 @@ +- "{'customzippedname:': ''}" \ No newline at end of file diff --git a/test/test_content/customzipped.source b/test/test_content/customzipped.source new file mode 100644 index 00000000..f94689e6 --- /dev/null +++ b/test/test_content/customzipped.source @@ -0,0 +1,4 @@ +- addsongdir: + path: "datadir_sort" + content: + - customzippedname: diff --git a/test/test_content/datadir/python/content/customzipedplugin.py b/test/test_content/datadir/python/content/customzipedplugin.py new file mode 100755 index 00000000..1d20b777 --- /dev/null +++ b/test/test_content/datadir/python/content/customzipedplugin.py @@ -0,0 +1,15 @@ +"""Fake plugin for test purposes.""" + +from patacrep.content import ContentItem, ContentList, validate_parser_argument + +class FakeContent(ContentItem): + """Fake content.""" + + def file_entry(self): + return {'customzippedname:':''} + +def parse(keyword, argument, config): + return ContentList([FakeContent()]) + +CONTENT_PLUGINS = {'customzipedname': parse} + diff --git a/test/test_content/datadir_zippedcontent/python/content b/test/test_content/datadir_zippedcontent/python/content new file mode 100644 index 00000000..a333d318 Binary files /dev/null and b/test/test_content/datadir_zippedcontent/python/content differ diff --git a/test/test_content/test_content.py b/test/test_content/test_content.py index bd429bf8..5edb9f96 100644 --- a/test/test_content/test_content.py +++ b/test/test_content/test_content.py @@ -101,7 +101,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): # Load the default songbook config config = prepare_songbook( - {'book':{'datadir':'datadir'}, 'content': sbcontent}, + {'book':{'datadir':['datadir', 'datadir_zippedcontent']}, 'content': sbcontent}, outputdir, base, outputdir