summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/aliases.events8
-rw-r--r--tests/data/documents.events11
-rw-r--r--tests/data/mappings.events44
-rw-r--r--tests/data/scalars.events24
-rw-r--r--tests/data/sequences.events81
5 files changed, 168 insertions, 0 deletions
diff --git a/tests/data/aliases.events b/tests/data/aliases.events
new file mode 100644
index 0000000..b24ab06
--- /dev/null
+++ b/tests/data/aliases.events
@@ -0,0 +1,8 @@
+- !StreamStart
+- !DocumentStart
+- !Sequence
+- !Scalar { anchor: 'myanchor', tag: '!mytag', value: 'data' }
+- !Alias { anchor: 'myanchor' }
+- !CollectionEnd
+- !DocumentEnd
+- !StreamEnd
diff --git a/tests/data/documents.events b/tests/data/documents.events
new file mode 100644
index 0000000..223a314
--- /dev/null
+++ b/tests/data/documents.events
@@ -0,0 +1,11 @@
+- !StreamStart
+- !DocumentStart
+- !Scalar { implicit: true }
+- !DocumentEnd
+- !DocumentStart
+- !Scalar { implicit: true }
+- !DocumentEnd
+- !DocumentStart
+- !Scalar { implicit: true }
+- !DocumentEnd
+- !StreamEnd
diff --git a/tests/data/mappings.events b/tests/data/mappings.events
new file mode 100644
index 0000000..bcdbd02
--- /dev/null
+++ b/tests/data/mappings.events
@@ -0,0 +1,44 @@
+- !StreamStart
+
+- !DocumentStart
+- !Mapping
+- !Scalar { implicit: true, value: 'key' }
+- !Scalar { implicit: true, value: 'value' }
+- !Scalar { implicit: true, value: 'empty mapping' }
+- !Mapping
+- !CollectionEnd
+- !Scalar { implicit: true, value: 'empty mapping with tag' }
+- !Mapping { tag: '!mytag' }
+- !CollectionEnd
+- !Scalar { implicit: true, value: 'block mapping' }
+- !Mapping
+- !Mapping
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !CollectionEnd
+- !Mapping
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !CollectionEnd
+- !CollectionEnd
+- !Scalar { implicit: true, value: 'flow mapping' }
+- !Mapping { flow: true }
+- !Scalar { implicit: true, value: 'key' }
+- !Scalar { implicit: true, value: 'value' }
+- !Mapping
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !CollectionEnd
+- !Mapping
+- !Scalar { implicit: true, value: 'complex' }
+- !Scalar { implicit: true, value: 'key' }
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !DocumentEnd
+
+- !StreamEnd
diff --git a/tests/data/scalars.events b/tests/data/scalars.events
new file mode 100644
index 0000000..93d4649
--- /dev/null
+++ b/tests/data/scalars.events
@@ -0,0 +1,24 @@
+- !StreamStart
+
+- !DocumentStart
+- !Mapping
+- !Scalar { implicit: true, value: 'empty scalar' }
+- !Scalar { implicit: true, value: '' }
+- !Scalar { implicit: true, value: 'implicit scalar' }
+- !Scalar { implicit: true, value: 'data' }
+- !Scalar { implicit: true, value: 'quoted scalar' }
+- !Scalar { value: 'data', style: '"' }
+- !Scalar { implicit: true, value: 'block scalar' }
+- !Scalar { value: 'data', style: '|' }
+- !Scalar { implicit: true, value: 'empty scalar with tag' }
+- !Scalar { implicit: true, tag: '!mytag', value: '' }
+- !Scalar { implicit: true, value: 'implicit scalar with tag' }
+- !Scalar { implicit: true, tag: '!mytag', value: 'data' }
+- !Scalar { implicit: true, value: 'quoted scalar with tag' }
+- !Scalar { value: 'data', style: '"', tag: '!mytag' }
+- !Scalar { implicit: true, value: 'block scalar with tag' }
+- !Scalar { value: 'data', style: '|', tag: '!mytag' }
+- !CollectionEnd
+- !DocumentEnd
+
+- !StreamEnd
diff --git a/tests/data/sequences.events b/tests/data/sequences.events
new file mode 100644
index 0000000..206f48c
--- /dev/null
+++ b/tests/data/sequences.events
@@ -0,0 +1,81 @@
+- !StreamStart
+
+- !DocumentStart
+- !Sequence
+- !CollectionEnd
+- !DocumentEnd
+
+- !DocumentStart
+- !Sequence { tag: '!mytag' }
+- !CollectionEnd
+- !DocumentEnd
+
+- !DocumentStart
+- !Sequence
+- !Sequence
+- !CollectionEnd
+- !Sequence { tag: '!mytag' }
+- !CollectionEnd
+- !Sequence
+- !Scalar
+- !Scalar { value: 'data' }
+- !Scalar { tag: '!mytag', value: 'data' }
+- !CollectionEnd
+- !Sequence
+- !Sequence
+- !Sequence
+- !Scalar
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !Sequence
+- !Sequence { tag: '!mytag' }
+- !Sequence
+- !Scalar { value: 'data' }
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !DocumentEnd
+
+- !DocumentStart
+- !Sequence
+- !Mapping
+- !Scalar { value: 'key1' }
+- !Sequence
+- !Scalar { value: 'data1' }
+- !Scalar { value: 'data2' }
+- !CollectionEnd
+- !Scalar { value: 'key2' }
+- !Sequence { tag: '!mytag1' }
+- !Scalar { value: 'data3' }
+- !Sequence
+- !Scalar { value: 'data4' }
+- !Scalar { value: 'data5' }
+- !CollectionEnd
+- !Sequence { tag: '!mytag2' }
+- !Scalar { value: 'data6' }
+- !Scalar { value: 'data7' }
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !DocumentEnd
+
+- !DocumentStart
+- !Sequence
+- !Sequence { flow: true }
+- !Sequence
+- !CollectionEnd
+- !Scalar
+- !Scalar { value: 'data' }
+- !Scalar { tag: '!mytag', value: 'data' }
+- !Sequence { tag: '!mytag' }
+- !Scalar { value: 'data' }
+- !Scalar { value: 'data' }
+- !CollectionEnd
+- !CollectionEnd
+- !CollectionEnd
+- !DocumentEnd
+
+- !StreamEnd