Skip to content

Instantly share code, notes, and snippets.

@ingydotnet
Created November 17, 2017 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ingydotnet/81485fa07b22b274c4b1a38439e12645 to your computer and use it in GitHub Desktop.
Save ingydotnet/81485fa07b22b274c4b1a38439e12645 to your computer and use it in GitHub Desktop.
#!/usr/bin/env testml v0.2.0
*in-yaml.parse.to-event == *test-event
*in-yaml.load.dump == *out-yaml
*in-yaml.load.to-json == *in-json.load-json.to-json
=== Spec Example 2.4. Sequence of Mappings
from: http://www.yaml.org/spec/1.2/spec.html#id2760193
tags: sequence mapping spec
--- in-yaml
-
name: Mark McGwire
hr: 65
avg: 0.278
-
name: Sammy Sosa
hr: 63
avg: 0.288
--- out-yaml
- name: Mark McGwire
hr: 65
avg: 0.278
- name: Sammy Sosa
hr: 63
avg: 0.288
--- in-json
[
{ "name": "Mark McGwire",
"hr" : 65,
"avg" : 0.278 },
{ "name": "Sammy Sosa",
"hr" : 63,
"avg" : 0.288
}
]
--- test-event
+STR
+DOC
+SEQ
+MAP
=VAL :name
=VAL :Mark McGwire
=VAL :hr
=VAL :65
=VAL :avg
=VAL :0.278
-MAP
+MAP
=VAL :name
=VAL :Sammy Sosa
=VAL :hr
=VAL :63
=VAL :avg
=VAL :0.288
-MAP
-SEQ
-DOC
-STR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment