Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implicit mapping corner cases. #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions src/E7H1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
- name: Nested implicit mappings
from: '@ethiraric'
tags: mapping sequence mapping flow
yaml: |
[a: [b: c]]
tree: |
+STR
+DOC
+SEQ []
+MAP {}
=VAL :a
+SEQ []
+MAP {}
=VAL :b
=VAL :c
-MAP
-SEQ
-MAP
-SEQ
-DOC
-STR
json: |
[
{
"a": [
{
"b": "c"
}
]
}
]

- name: Nested implicit mappings with implicit null-keys
from: '@ethiraric'
tags: mapping sequence mapping flow
yaml: |
[: [:]]
tree: |
+STR
+DOC
+SEQ []
+MAP {}
=VAL :
+SEQ []
+MAP {}
=VAL :
=VAL :
-MAP
-SEQ
-MAP
-SEQ
-DOC
-STR
json: |
[
{
null: [
{
null: null
}
]
}
]

- name: Interleaved implicit and non-implicit mappings
from: '@ethiraric'
tags: mapping sequence mapping flow
yaml: |
[a: [[b:]]]
tree: |
+STR
+DOC
+SEQ []
+MAP {}
=VAL :a
+SEQ []
+SEQ []
+MAP {}
=VAL :b
=VAL :
-MAP
-SEQ
-SEQ
-MAP
-SEQ
-DOC
-STR
json: |
[
{
a: [
[
{
b: null
}
]
]
}
]

- name: Implicit mapping sequence missing its preceding space
from: '@ethiraric'
tags: mapping sequence mapping flow edge error
fail: true
yaml: |
[:[]]
tree: |
+STR
+DOC
+SEQ []
+MAP {}
=VAL :