summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorTina Müller <cpan2@tinita.de>2019-12-06 22:02:52 +0100
committerTina Müller <cpan2@tinita.de>2019-12-06 22:38:10 +0100
commitdff1ce560c958516846e060d0e22e766009299e8 (patch)
treec8025c3a220b7748e8e39a5f8e5ad44fb08a52b0 /tests/data
parenteb459f842f690f809b649726f0a317909a92a29c (diff)
downloadpyyaml-git-perlpunk/default-multi.tar.gz
Allow add_multi_constructor with Noneperlpunk/default-multi
Loader.add_multi_constructor(None, myconstructor) Also add test for add_multi_constructor('!', ...) etc. See issue #317
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/multi-constructor.code4
-rw-r--r--tests/data/multi-constructor.multi3
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/data/multi-constructor.code b/tests/data/multi-constructor.code
new file mode 100644
index 0000000..590d852
--- /dev/null
+++ b/tests/data/multi-constructor.code
@@ -0,0 +1,4 @@
+[
+ {'Tag1': ['a', 1, 'b', 2]},
+ {'Tag2': ['a', 1, 'b', 2]},
+]
diff --git a/tests/data/multi-constructor.multi b/tests/data/multi-constructor.multi
new file mode 100644
index 0000000..4f5d71f
--- /dev/null
+++ b/tests/data/multi-constructor.multi
@@ -0,0 +1,3 @@
+---
+- !Tag1 [a, 1, b, 2]
+- !!Tag2 [a, 1, b, 2]