summaryrefslogtreecommitdiffstats
path: root/tests/yaml-1.2-spec-examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:38:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:38:50 +0000
commit09e7b47bad7e7310a6f52bdc20e9a9f251e79769 (patch)
treec93d189c1318902b8f1e5333d7ee34a1e9db9a34 /tests/yaml-1.2-spec-examples
parentInitial commit. (diff)
downloadyamllint-09e7b47bad7e7310a6f52bdc20e9a9f251e79769.tar.xz
yamllint-09e7b47bad7e7310a6f52bdc20e9a9f251e79769.zip
Adding upstream version 1.33.0.upstream/1.33.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/yaml-1.2-spec-examples')
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.16
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.26
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.34
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.42
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.52
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.63
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.75
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.85
-rw-r--r--tests/yaml-1.2-spec-examples/example-10.97
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.13
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.108
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.119
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.129
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.134
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.144
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.158
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.168
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.177
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.187
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.195
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.23
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.205
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.213
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.224
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.2314
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.2414
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.257
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.267
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.2729
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.2829
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.38
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.48
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.55
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.65
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.710
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.810
-rw-r--r--tests/yaml-1.2-spec-examples/example-2.98
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.11
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.102
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.113
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.126
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.135
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.143
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.23
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.37
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.42
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.51
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.62
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.76
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.82
-rw-r--r--tests/yaml-1.2-spec-examples/example-5.92
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.112
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.103
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.114
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.126
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.133
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.144
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.153
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.163
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.173
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.187
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.193
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.24
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.203
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.217
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.223
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.233
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.242
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.252
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.265
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.274
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.284
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.292
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.33
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.47
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.57
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.67
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.76
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.87
-rw-r--r--tests/yaml-1.2-spec-examples/example-6.92
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.14
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.1012
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.113
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.124
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.132
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.148
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.152
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.165
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.176
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.185
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.193
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.24
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.204
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.213
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.223
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.235
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.245
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.34
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.43
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.55
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.64
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.71
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.83
-rw-r--r--tests/yaml-1.2-spec-examples/example-7.94
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.110
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.1016
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.1116
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.1216
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.1315
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.143
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.156
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.162
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.175
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.184
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.193
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.211
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.206
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.216
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.226
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.38
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.46
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.519
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.66
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.74
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.89
-rw-r--r--tests/yaml-1.2-spec-examples/example-8.94
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.13
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.24
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.37
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.47
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.58
-rw-r--r--tests/yaml-1.2-spec-examples/example-9.67
132 files changed, 774 insertions, 0 deletions
diff --git a/tests/yaml-1.2-spec-examples/example-10.1 b/tests/yaml-1.2-spec-examples/example-10.1
new file mode 100644
index 0000000..19c9782
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.1
@@ -0,0 +1,6 @@
+Block style: !!map
+ Clark : Evans
+ Ingy : döt Net
+ Oren : Ben-Kiki
+
+Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki }
diff --git a/tests/yaml-1.2-spec-examples/example-10.2 b/tests/yaml-1.2-spec-examples/example-10.2
new file mode 100644
index 0000000..63899c3
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.2
@@ -0,0 +1,6 @@
+Block style: !!seq
+- Clark Evans
+- Ingy döt Net
+- Oren Ben-Kiki
+
+Flow style: !!seq [ Clark Evans, Ingy döt Net, Oren Ben-Kiki ]
diff --git a/tests/yaml-1.2-spec-examples/example-10.3 b/tests/yaml-1.2-spec-examples/example-10.3
new file mode 100644
index 0000000..50e83bc
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.3
@@ -0,0 +1,4 @@
+Block style: !!str |-
+ String: just a theory.
+
+Flow style: !!str "String: just a theory."
diff --git a/tests/yaml-1.2-spec-examples/example-10.4 b/tests/yaml-1.2-spec-examples/example-10.4
new file mode 100644
index 0000000..7529872
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.4
@@ -0,0 +1,2 @@
+!!null null: value for null key
+key with null value: !!null null
diff --git a/tests/yaml-1.2-spec-examples/example-10.5 b/tests/yaml-1.2-spec-examples/example-10.5
new file mode 100644
index 0000000..2c11cad
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.5
@@ -0,0 +1,2 @@
+YAML is a superset of JSON: !!bool true
+Pluto is a planet: !!bool false
diff --git a/tests/yaml-1.2-spec-examples/example-10.6 b/tests/yaml-1.2-spec-examples/example-10.6
new file mode 100644
index 0000000..79fceea
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.6
@@ -0,0 +1,3 @@
+negative: !!int -12
+zero: !!int 0
+positive: !!int 34
diff --git a/tests/yaml-1.2-spec-examples/example-10.7 b/tests/yaml-1.2-spec-examples/example-10.7
new file mode 100644
index 0000000..f924530
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.7
@@ -0,0 +1,5 @@
+negative: !!float -1
+zero: !!float 0
+positive: !!float 2.3e4
+infinity: !!float .inf
+not a number: !!float .nan
diff --git a/tests/yaml-1.2-spec-examples/example-10.8 b/tests/yaml-1.2-spec-examples/example-10.8
new file mode 100644
index 0000000..552ff82
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.8
@@ -0,0 +1,5 @@
+A null: null
+Booleans: [ true, false ]
+Integers: [ 0, -0, 3, -19 ]
+Floats: [ 0., -0.0, 12e03, -2E+05 ]
+Invalid: [ True, Null, 0o7, 0x3A, +12.3 ]
diff --git a/tests/yaml-1.2-spec-examples/example-10.9 b/tests/yaml-1.2-spec-examples/example-10.9
new file mode 100644
index 0000000..28b8111
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-10.9
@@ -0,0 +1,7 @@
+A null: null
+Also a null: # Empty
+Not a null: ""
+Booleans: [ true, True, false, FALSE ]
+Integers: [ 0, 0o7, 0x3A, -19 ]
+Floats: [ 0., -0.0, .5, +12e03, -2E+05 ]
+Also floats: [ .inf, -.Inf, +.INF, .NAN ]
diff --git a/tests/yaml-1.2-spec-examples/example-2.1 b/tests/yaml-1.2-spec-examples/example-2.1
new file mode 100644
index 0000000..d12e671
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.1
@@ -0,0 +1,3 @@
+- Mark McGwire
+- Sammy Sosa
+- Ken Griffey
diff --git a/tests/yaml-1.2-spec-examples/example-2.10 b/tests/yaml-1.2-spec-examples/example-2.10
new file mode 100644
index 0000000..61808f6
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.10
@@ -0,0 +1,8 @@
+---
+hr:
+ - Mark McGwire
+ # Following node labeled SS
+ - &SS Sammy Sosa
+rbi:
+ - *SS # Subsequent occurrence
+ - Ken Griffey
diff --git a/tests/yaml-1.2-spec-examples/example-2.11 b/tests/yaml-1.2-spec-examples/example-2.11
new file mode 100644
index 0000000..9123ce2
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.11
@@ -0,0 +1,9 @@
+? - Detroit Tigers
+ - Chicago cubs
+:
+ - 2001-07-23
+
+? [ New York Yankees,
+ Atlanta Braves ]
+: [ 2001-07-02, 2001-08-12,
+ 2001-08-14 ]
diff --git a/tests/yaml-1.2-spec-examples/example-2.12 b/tests/yaml-1.2-spec-examples/example-2.12
new file mode 100644
index 0000000..8125296
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.12
@@ -0,0 +1,9 @@
+---
+# Products purchased
+- item : Super Hoop
+ quantity: 1
+- item : Basketball
+ quantity: 4
+- item : Big Shoes
+ quantity: 1
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.13 b/tests/yaml-1.2-spec-examples/example-2.13
new file mode 100644
index 0000000..13fb656
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.13
@@ -0,0 +1,4 @@
+# ASCII Art
+--- |
+ \//||\/||
+ // || ||__
diff --git a/tests/yaml-1.2-spec-examples/example-2.14 b/tests/yaml-1.2-spec-examples/example-2.14
new file mode 100644
index 0000000..fb4ed4a
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.14
@@ -0,0 +1,4 @@
+--- >
+ Mark McGwire's
+ year was crippled
+ by a knee injury.
diff --git a/tests/yaml-1.2-spec-examples/example-2.15 b/tests/yaml-1.2-spec-examples/example-2.15
new file mode 100644
index 0000000..80b89a6
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.15
@@ -0,0 +1,8 @@
+>
+ Sammy Sosa completed another
+ fine season with great stats.
+
+ 63 Home Runs
+ 0.288 Batting Average
+
+ What a year!
diff --git a/tests/yaml-1.2-spec-examples/example-2.16 b/tests/yaml-1.2-spec-examples/example-2.16
new file mode 100644
index 0000000..223ec81
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.16
@@ -0,0 +1,8 @@
+name: Mark McGwire
+accomplishment: >
+ Mark set a major league
+ home run record in 1998.
+stats: |
+ 65 Home Runs
+ 0.278 Batting Average
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.17 b/tests/yaml-1.2-spec-examples/example-2.17
new file mode 100644
index 0000000..c5c2a18
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.17
@@ -0,0 +1,7 @@
+unicode: "Sosa did fine.\u263A"
+control: "\b1998\t1999\t2000\n"
+hex esc: "\x0d\x0a is \r\n"
+
+single: '"Howdy!" he cried.'
+quoted: ' # Not a ''comment''.'
+tie-fighter: '|\-*-/|'
diff --git a/tests/yaml-1.2-spec-examples/example-2.18 b/tests/yaml-1.2-spec-examples/example-2.18
new file mode 100644
index 0000000..0f49d9c
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.18
@@ -0,0 +1,7 @@
+plain:
+ This unquoted scalar
+ spans many lines.
+
+quoted: "So does this
+ quoted scalar.\n"
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.19 b/tests/yaml-1.2-spec-examples/example-2.19
new file mode 100644
index 0000000..843b149
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.19
@@ -0,0 +1,5 @@
+canonical: 12345
+decimal: +12345
+octal: 0o14
+hexadecimal: 0xC
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.2 b/tests/yaml-1.2-spec-examples/example-2.2
new file mode 100644
index 0000000..7b7ec94
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.2
@@ -0,0 +1,3 @@
+hr: 65 # Home runs
+avg: 0.278 # Batting average
+rbi: 147 # Runs Batted In
diff --git a/tests/yaml-1.2-spec-examples/example-2.20 b/tests/yaml-1.2-spec-examples/example-2.20
new file mode 100644
index 0000000..499cbb1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.20
@@ -0,0 +1,5 @@
+canonical: 1.23015e+3
+exponential: 12.3015e+02
+fixed: 1230.15
+negative infinity: -.inf
+not a number: .NaN
diff --git a/tests/yaml-1.2-spec-examples/example-2.21 b/tests/yaml-1.2-spec-examples/example-2.21
new file mode 100644
index 0000000..510165d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.21
@@ -0,0 +1,3 @@
+null:
+booleans: [ true, false ]
+string: '012345'
diff --git a/tests/yaml-1.2-spec-examples/example-2.22 b/tests/yaml-1.2-spec-examples/example-2.22
new file mode 100644
index 0000000..aaac185
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.22
@@ -0,0 +1,4 @@
+canonical: 2001-12-15T02:59:43.1Z
+iso8601: 2001-12-14t21:59:43.10-05:00
+spaced: 2001-12-14 21:59:43.10 -5
+date: 2002-12-14
diff --git a/tests/yaml-1.2-spec-examples/example-2.23 b/tests/yaml-1.2-spec-examples/example-2.23
new file mode 100644
index 0000000..de1a732
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.23
@@ -0,0 +1,14 @@
+---
+not-date: !!str 2002-04-28
+
+picture: !!binary |
+ R0lGODlhDAAMAIQAAP//9/X
+ 17unp5WZmZgAAAOfn515eXv
+ Pz7Y6OjuDg4J+fn5OTk6enp
+ 56enmleECcgggoBADs=
+
+application specific tag: !something |
+ The semantics of the tag
+ above may be different for
+ different documents.
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.24 b/tests/yaml-1.2-spec-examples/example-2.24
new file mode 100644
index 0000000..1180757
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.24
@@ -0,0 +1,14 @@
+%TAG ! tag:clarkevans.com,2002:
+--- !shape
+ # Use the ! handle for presenting
+ # tag:clarkevans.com,2002:circle
+- !circle
+ center: &ORIGIN {x: 73, y: 129}
+ radius: 7
+- !line
+ start: *ORIGIN
+ finish: { x: 89, y: 102 }
+- !label
+ start: *ORIGIN
+ color: 0xFFEEBB
+ text: Pretty vector drawing.
diff --git a/tests/yaml-1.2-spec-examples/example-2.25 b/tests/yaml-1.2-spec-examples/example-2.25
new file mode 100644
index 0000000..cf4943a
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.25
@@ -0,0 +1,7 @@
+# Sets are represented as a
+# Mapping where each key is
+# associated with a null value
+--- !!set
+? Mark McGwire
+? Sammy Sosa
+? Ken Griff
diff --git a/tests/yaml-1.2-spec-examples/example-2.26 b/tests/yaml-1.2-spec-examples/example-2.26
new file mode 100644
index 0000000..a28a7ac
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.26
@@ -0,0 +1,7 @@
+# Ordered maps are represented as
+# A sequence of mappings, with
+# each mapping having one key
+--- !!omap
+- Mark McGwire: 65
+- Sammy Sosa: 63
+- Ken Griffy: 58
diff --git a/tests/yaml-1.2-spec-examples/example-2.27 b/tests/yaml-1.2-spec-examples/example-2.27
new file mode 100644
index 0000000..4625739
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.27
@@ -0,0 +1,29 @@
+--- !<tag:clarkevans.com,2002:invoice>
+invoice: 34843
+date : 2001-01-23
+bill-to: &id001
+ given : Chris
+ family : Dumars
+ address:
+ lines: |
+ 458 Walkman Dr.
+ Suite #292
+ city : Royal Oak
+ state : MI
+ postal : 48046
+ship-to: *id001
+product:
+ - sku : BL394D
+ quantity : 4
+ description : Basketball
+ price : 450.00
+ - sku : BL4438H
+ quantity : 1
+ description : Super Hoop
+ price : 2392.00
+tax : 251.42
+total: 4443.52
+comments:
+ Late afternoon is best.
+ Backup contact is Nancy
+ Billsmer @ 338-4338.
diff --git a/tests/yaml-1.2-spec-examples/example-2.28 b/tests/yaml-1.2-spec-examples/example-2.28
new file mode 100644
index 0000000..eb5fb8a
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.28
@@ -0,0 +1,29 @@
+---
+Time: 2001-11-23 15:01:42 -5
+User: ed
+Warning:
+ This is an error message
+ for the log file
+---
+Time: 2001-11-23 15:02:31 -5
+User: ed
+Warning:
+ A slightly different error
+ message.
+---
+Date: 2001-11-23 15:03:17 -5
+User: ed
+Fatal:
+ Unknown variable "bar"
+Stack:
+ - file: TopClass.py
+ line: 23
+ code: |
+ x = MoreObject("345\n")
+ - file: MoreClass.py
+ line: 58
+ code: |-
+ foo = bar
+
+
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.3 b/tests/yaml-1.2-spec-examples/example-2.3
new file mode 100644
index 0000000..656d628
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.3
@@ -0,0 +1,8 @@
+american:
+ - Boston Red Sox
+ - Detroit Tigers
+ - New York Yankees
+national:
+ - New York Mets
+ - Chicago Cubs
+ - Atlanta Braves
diff --git a/tests/yaml-1.2-spec-examples/example-2.4 b/tests/yaml-1.2-spec-examples/example-2.4
new file mode 100644
index 0000000..430f6b3
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.4
@@ -0,0 +1,8 @@
+-
+ name: Mark McGwire
+ hr: 65
+ avg: 0.278
+-
+ name: Sammy Sosa
+ hr: 63
+ avg: 0.288
diff --git a/tests/yaml-1.2-spec-examples/example-2.5 b/tests/yaml-1.2-spec-examples/example-2.5
new file mode 100644
index 0000000..9aafb4e
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.5
@@ -0,0 +1,5 @@
+- [name , hr, avg ]
+- [Mark McGwire, 65, 0.278]
+- [Sammy Sosa , 63, 0.288]
+
+
diff --git a/tests/yaml-1.2-spec-examples/example-2.6 b/tests/yaml-1.2-spec-examples/example-2.6
new file mode 100644
index 0000000..7a957b2
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.6
@@ -0,0 +1,5 @@
+Mark McGwire: {hr: 65, avg: 0.278}
+Sammy Sosa: {
+ hr: 63,
+ avg: 0.288
+ }
diff --git a/tests/yaml-1.2-spec-examples/example-2.7 b/tests/yaml-1.2-spec-examples/example-2.7
new file mode 100644
index 0000000..bc711d5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.7
@@ -0,0 +1,10 @@
+# Ranking of 1998 home runs
+---
+- Mark McGwire
+- Sammy Sosa
+- Ken Griffey
+
+# Team ranking
+---
+- Chicago Cubs
+- St Louis Cardinals
diff --git a/tests/yaml-1.2-spec-examples/example-2.8 b/tests/yaml-1.2-spec-examples/example-2.8
new file mode 100644
index 0000000..05e102d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.8
@@ -0,0 +1,10 @@
+---
+time: 20:03:20
+player: Sammy Sosa
+action: strike (miss)
+...
+---
+time: 20:03:47
+player: Sammy Sosa
+action: grand slam
+...
diff --git a/tests/yaml-1.2-spec-examples/example-2.9 b/tests/yaml-1.2-spec-examples/example-2.9
new file mode 100644
index 0000000..e264180
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-2.9
@@ -0,0 +1,8 @@
+---
+hr: # 1998 hr ranking
+ - Mark McGwire
+ - Sammy Sosa
+rbi:
+ # 1998 rbi ranking
+ - Sammy Sosa
+ - Ken Griffey
diff --git a/tests/yaml-1.2-spec-examples/example-5.1 b/tests/yaml-1.2-spec-examples/example-5.1
new file mode 100644
index 0000000..62524c0
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.1
@@ -0,0 +1 @@
+# Comment only.
diff --git a/tests/yaml-1.2-spec-examples/example-5.10 b/tests/yaml-1.2-spec-examples/example-5.10
new file mode 100644
index 0000000..a4caf91
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.10
@@ -0,0 +1,2 @@
+commercial-at: @text
+grave-accent: `text
diff --git a/tests/yaml-1.2-spec-examples/example-5.11 b/tests/yaml-1.2-spec-examples/example-5.11
new file mode 100644
index 0000000..f980428
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.11
@@ -0,0 +1,3 @@
+|
+ Line break (no glyph)
+ Line break (glyphed)
diff --git a/tests/yaml-1.2-spec-examples/example-5.12 b/tests/yaml-1.2-spec-examples/example-5.12
new file mode 100644
index 0000000..af9a321
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.12
@@ -0,0 +1,6 @@
+# Tabs and spaces
+quoted: "Quoted "
+block: |
+ void main() {
+ printf("Hello, world!\n");
+ }
diff --git a/tests/yaml-1.2-spec-examples/example-5.13 b/tests/yaml-1.2-spec-examples/example-5.13
new file mode 100644
index 0000000..a8f1b48
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.13
@@ -0,0 +1,5 @@
+"Fun with \\
+\" \a \b \e \f \
+\n \r \t \v \0 \
+\  \_ \N \L \P \
+\x41 \u0041 \U00000041"
diff --git a/tests/yaml-1.2-spec-examples/example-5.14 b/tests/yaml-1.2-spec-examples/example-5.14
new file mode 100644
index 0000000..7bf12b6
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.14
@@ -0,0 +1,3 @@
+Bad escapes:
+ "\c
+ \xq-"
diff --git a/tests/yaml-1.2-spec-examples/example-5.2 b/tests/yaml-1.2-spec-examples/example-5.2
new file mode 100644
index 0000000..9f1ca25
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.2
@@ -0,0 +1,3 @@
+- Invalid use of BOM
+
+- Inside a document.
diff --git a/tests/yaml-1.2-spec-examples/example-5.3 b/tests/yaml-1.2-spec-examples/example-5.3
new file mode 100644
index 0000000..608ea19
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.3
@@ -0,0 +1,7 @@
+sequence:
+- one
+- two
+mapping:
+ ? sky
+ : blue
+ sea : green
diff --git a/tests/yaml-1.2-spec-examples/example-5.4 b/tests/yaml-1.2-spec-examples/example-5.4
new file mode 100644
index 0000000..df33847
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.4
@@ -0,0 +1,2 @@
+sequence: [ one, two, ]
+mapping: { sky: blue, sea: green }
diff --git a/tests/yaml-1.2-spec-examples/example-5.5 b/tests/yaml-1.2-spec-examples/example-5.5
new file mode 100644
index 0000000..62524c0
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.5
@@ -0,0 +1 @@
+# Comment only.
diff --git a/tests/yaml-1.2-spec-examples/example-5.6 b/tests/yaml-1.2-spec-examples/example-5.6
new file mode 100644
index 0000000..7a1f9b3
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.6
@@ -0,0 +1,2 @@
+anchored: !local &anchor value
+alias: *anchor
diff --git a/tests/yaml-1.2-spec-examples/example-5.7 b/tests/yaml-1.2-spec-examples/example-5.7
new file mode 100644
index 0000000..934726c
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.7
@@ -0,0 +1,6 @@
+literal: |
+ some
+ text
+folded: >
+ some
+ text
diff --git a/tests/yaml-1.2-spec-examples/example-5.8 b/tests/yaml-1.2-spec-examples/example-5.8
new file mode 100644
index 0000000..04ebf69
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.8
@@ -0,0 +1,2 @@
+single: 'text'
+double: "text"
diff --git a/tests/yaml-1.2-spec-examples/example-5.9 b/tests/yaml-1.2-spec-examples/example-5.9
new file mode 100644
index 0000000..62204de
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-5.9
@@ -0,0 +1,2 @@
+%YAML 1.2
+--- text
diff --git a/tests/yaml-1.2-spec-examples/example-6.1 b/tests/yaml-1.2-spec-examples/example-6.1
new file mode 100644
index 0000000..b5496c1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.1
@@ -0,0 +1,12 @@
+ # Leading comment line spaces are
+ # neither content nor indentation.
+
+Not indented:
+ By one space: |
+ By four
+ spaces
+ Flow style: [ # Leading spaces
+ By two, # in flow style
+ Also by two, # are neither
+ Still by two # content nor
+ ] # indentation.
diff --git a/tests/yaml-1.2-spec-examples/example-6.10 b/tests/yaml-1.2-spec-examples/example-6.10
new file mode 100644
index 0000000..ff741e5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.10
@@ -0,0 +1,3 @@
+ # Comment
+
+
diff --git a/tests/yaml-1.2-spec-examples/example-6.11 b/tests/yaml-1.2-spec-examples/example-6.11
new file mode 100644
index 0000000..86308dd
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.11
@@ -0,0 +1,4 @@
+key: # Comment
+ # lines
+ value
+
diff --git a/tests/yaml-1.2-spec-examples/example-6.12 b/tests/yaml-1.2-spec-examples/example-6.12
new file mode 100644
index 0000000..e1e1113
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.12
@@ -0,0 +1,6 @@
+{ first: Sammy, last: Sosa }:
+# Statistics:
+ hr: # Home runs
+ 65
+ avg: # Average
+ 0.278
diff --git a/tests/yaml-1.2-spec-examples/example-6.13 b/tests/yaml-1.2-spec-examples/example-6.13
new file mode 100644
index 0000000..2113eb6
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.13
@@ -0,0 +1,3 @@
+%FOO bar baz # Should be ignored
+ # with a warning.
+--- "foo"
diff --git a/tests/yaml-1.2-spec-examples/example-6.14 b/tests/yaml-1.2-spec-examples/example-6.14
new file mode 100644
index 0000000..ef326d5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.14
@@ -0,0 +1,4 @@
+%YAML 1.3 # Attempt parsing
+ # with a warning
+---
+"foo"
diff --git a/tests/yaml-1.2-spec-examples/example-6.15 b/tests/yaml-1.2-spec-examples/example-6.15
new file mode 100644
index 0000000..acff4e8
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.15
@@ -0,0 +1,3 @@
+%YAML 1.2
+%YAML 1.1
+foo
diff --git a/tests/yaml-1.2-spec-examples/example-6.16 b/tests/yaml-1.2-spec-examples/example-6.16
new file mode 100644
index 0000000..50f5ab9
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.16
@@ -0,0 +1,3 @@
+%TAG !yaml! tag:yaml.org,2002:
+---
+!yaml!str "foo"
diff --git a/tests/yaml-1.2-spec-examples/example-6.17 b/tests/yaml-1.2-spec-examples/example-6.17
new file mode 100644
index 0000000..7276eae
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.17
@@ -0,0 +1,3 @@
+%TAG ! !foo
+%TAG ! !foo
+bar
diff --git a/tests/yaml-1.2-spec-examples/example-6.18 b/tests/yaml-1.2-spec-examples/example-6.18
new file mode 100644
index 0000000..d79f04e
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.18
@@ -0,0 +1,7 @@
+# Private
+!foo "bar"
+...
+# Global
+%TAG ! tag:example.com,2000:app/
+---
+!foo "bar"
diff --git a/tests/yaml-1.2-spec-examples/example-6.19 b/tests/yaml-1.2-spec-examples/example-6.19
new file mode 100644
index 0000000..7b9d9b1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.19
@@ -0,0 +1,3 @@
+%TAG !! tag:example.com,2000:app/
+---
+!!int 1 - 3 # Interval, not integer
diff --git a/tests/yaml-1.2-spec-examples/example-6.2 b/tests/yaml-1.2-spec-examples/example-6.2
new file mode 100644
index 0000000..ac0d970
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.2
@@ -0,0 +1,4 @@
+? a
+: - b
+ - - c
+ - d
diff --git a/tests/yaml-1.2-spec-examples/example-6.20 b/tests/yaml-1.2-spec-examples/example-6.20
new file mode 100644
index 0000000..690f138
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.20
@@ -0,0 +1,3 @@
+%TAG !e! tag:example.com,2000:app/
+---
+!e!foo "bar"
diff --git a/tests/yaml-1.2-spec-examples/example-6.21 b/tests/yaml-1.2-spec-examples/example-6.21
new file mode 100644
index 0000000..57315a5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.21
@@ -0,0 +1,7 @@
+%TAG !m! !my-
+--- # Bulb here
+!m!light fluorescent
+...
+%TAG !m! !my-
+--- # Color here
+!m!light green
diff --git a/tests/yaml-1.2-spec-examples/example-6.22 b/tests/yaml-1.2-spec-examples/example-6.22
new file mode 100644
index 0000000..eedfe04
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.22
@@ -0,0 +1,3 @@
+%TAG !e! tag:example.com,2000:app/
+---
+- !e!foo "bar"
diff --git a/tests/yaml-1.2-spec-examples/example-6.23 b/tests/yaml-1.2-spec-examples/example-6.23
new file mode 100644
index 0000000..66d75f3
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.23
@@ -0,0 +1,3 @@
+!!str &a1 "foo":
+ !!str bar
+&a2 baz : *a1
diff --git a/tests/yaml-1.2-spec-examples/example-6.24 b/tests/yaml-1.2-spec-examples/example-6.24
new file mode 100644
index 0000000..8e51f52
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.24
@@ -0,0 +1,2 @@
+!<tag:yaml.org,2002:str> foo :
+ !<!bar> baz
diff --git a/tests/yaml-1.2-spec-examples/example-6.25 b/tests/yaml-1.2-spec-examples/example-6.25
new file mode 100644
index 0000000..f7d1b01
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.25
@@ -0,0 +1,2 @@
+- !<!> foo
+- !<$:?> bar
diff --git a/tests/yaml-1.2-spec-examples/example-6.26 b/tests/yaml-1.2-spec-examples/example-6.26
new file mode 100644
index 0000000..70365f4
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.26
@@ -0,0 +1,5 @@
+%TAG !e! tag:example.com,2000:app/
+---
+- !local foo
+- !!str bar
+- !e!tag%21 baz
diff --git a/tests/yaml-1.2-spec-examples/example-6.27 b/tests/yaml-1.2-spec-examples/example-6.27
new file mode 100644
index 0000000..d7fff4e
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.27
@@ -0,0 +1,4 @@
+%TAG !e! tag:example,2000:app/
+---
+- !e! foo
+- !h!bar baz
diff --git a/tests/yaml-1.2-spec-examples/example-6.28 b/tests/yaml-1.2-spec-examples/example-6.28
new file mode 100644
index 0000000..98aa565
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.28
@@ -0,0 +1,4 @@
+# Assuming conventional resolution:
+- "12"
+- 12
+- ! 12
diff --git a/tests/yaml-1.2-spec-examples/example-6.29 b/tests/yaml-1.2-spec-examples/example-6.29
new file mode 100644
index 0000000..600d179
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.29
@@ -0,0 +1,2 @@
+First occurrence: &anchor Value
+Second occurrence: *anchor
diff --git a/tests/yaml-1.2-spec-examples/example-6.3 b/tests/yaml-1.2-spec-examples/example-6.3
new file mode 100644
index 0000000..5f48cf4
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.3
@@ -0,0 +1,3 @@
+- foo: bar
+- - baz
+ - baz
diff --git a/tests/yaml-1.2-spec-examples/example-6.4 b/tests/yaml-1.2-spec-examples/example-6.4
new file mode 100644
index 0000000..2f62d08
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.4
@@ -0,0 +1,7 @@
+plain: text
+ lines
+quoted: "text
+ lines"
+block: |
+ text
+ lines
diff --git a/tests/yaml-1.2-spec-examples/example-6.5 b/tests/yaml-1.2-spec-examples/example-6.5
new file mode 100644
index 0000000..8ea3e52
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.5
@@ -0,0 +1,7 @@
+Folding:
+ "Empty line
+
+ as a line feed"
+Chomping: |
+ Clipped empty lines
+
diff --git a/tests/yaml-1.2-spec-examples/example-6.6 b/tests/yaml-1.2-spec-examples/example-6.6
new file mode 100644
index 0000000..1c5090d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.6
@@ -0,0 +1,7 @@
+>-
+ trimmed
+
+
+
+ as
+ space
diff --git a/tests/yaml-1.2-spec-examples/example-6.7 b/tests/yaml-1.2-spec-examples/example-6.7
new file mode 100644
index 0000000..0896cc6
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.7
@@ -0,0 +1,6 @@
+>
+ foo
+
+ bar
+
+ baz
diff --git a/tests/yaml-1.2-spec-examples/example-6.8 b/tests/yaml-1.2-spec-examples/example-6.8
new file mode 100644
index 0000000..d6af812
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.8
@@ -0,0 +1,7 @@
+"
+ foo
+
+ bar
+
+ baz
+"
diff --git a/tests/yaml-1.2-spec-examples/example-6.9 b/tests/yaml-1.2-spec-examples/example-6.9
new file mode 100644
index 0000000..9a94fc1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-6.9
@@ -0,0 +1,2 @@
+key: # Comment
+ valueeof
diff --git a/tests/yaml-1.2-spec-examples/example-7.1 b/tests/yaml-1.2-spec-examples/example-7.1
new file mode 100644
index 0000000..3887676
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.1
@@ -0,0 +1,4 @@
+First occurrence: &anchor Foo
+Second occurrence: *anchor
+Override anchor: &anchor Bar
+Reuse anchor: *anchor
diff --git a/tests/yaml-1.2-spec-examples/example-7.10 b/tests/yaml-1.2-spec-examples/example-7.10
new file mode 100644
index 0000000..7ed369f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.10
@@ -0,0 +1,12 @@
+# Outside flow collection:
+- ::vector
+- ": - ()"
+- Up, up, and away!
+- -123
+- http://example.com/foo#bar
+# Inside flow collection:
+- [ ::vector,
+ ": - ()",
+ "Up, up and away!",
+ -123,
+ http://example.com/foo#bar ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.11 b/tests/yaml-1.2-spec-examples/example-7.11
new file mode 100644
index 0000000..fd57f65
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.11
@@ -0,0 +1,3 @@
+implicit block key : [
+ implicit flow key : value,
+ ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.12 b/tests/yaml-1.2-spec-examples/example-7.12
new file mode 100644
index 0000000..0499250
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.12
@@ -0,0 +1,4 @@
+1st non-empty
+
+ 2nd non-empty
+ 3rd non-empty
diff --git a/tests/yaml-1.2-spec-examples/example-7.13 b/tests/yaml-1.2-spec-examples/example-7.13
new file mode 100644
index 0000000..cd77480
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.13
@@ -0,0 +1,2 @@
+- [ one, two, ]
+- [three ,four]
diff --git a/tests/yaml-1.2-spec-examples/example-7.14 b/tests/yaml-1.2-spec-examples/example-7.14
new file mode 100644
index 0000000..6327116
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.14
@@ -0,0 +1,8 @@
+[
+"double
+ quoted", 'single
+ quoted',
+plain
+ text, [ nested ],
+single: pair,
+]
diff --git a/tests/yaml-1.2-spec-examples/example-7.15 b/tests/yaml-1.2-spec-examples/example-7.15
new file mode 100644
index 0000000..0718643
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.15
@@ -0,0 +1,2 @@
+- { one : two , three: four , }
+- {five: six,seven : eight}
diff --git a/tests/yaml-1.2-spec-examples/example-7.16 b/tests/yaml-1.2-spec-examples/example-7.16
new file mode 100644
index 0000000..cb84a99
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.16
@@ -0,0 +1,5 @@
+{
+? explicit: entry,
+implicit: entry,
+?
+}
diff --git a/tests/yaml-1.2-spec-examples/example-7.17 b/tests/yaml-1.2-spec-examples/example-7.17
new file mode 100644
index 0000000..3cc1296
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.17
@@ -0,0 +1,6 @@
+{
+unquoted : "separate",
+http://foo.com,
+omitted value:,
+: omitted key,
+}
diff --git a/tests/yaml-1.2-spec-examples/example-7.18 b/tests/yaml-1.2-spec-examples/example-7.18
new file mode 100644
index 0000000..7fc069c
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.18
@@ -0,0 +1,5 @@
+{
+"adjacent":value,
+"readable": value,
+"empty":
+}
diff --git a/tests/yaml-1.2-spec-examples/example-7.19 b/tests/yaml-1.2-spec-examples/example-7.19
new file mode 100644
index 0000000..77f3eb3
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.19
@@ -0,0 +1,3 @@
+[
+foo: bar
+]
diff --git a/tests/yaml-1.2-spec-examples/example-7.2 b/tests/yaml-1.2-spec-examples/example-7.2
new file mode 100644
index 0000000..aa86103
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.2
@@ -0,0 +1,4 @@
+{
+ foo : !!str,
+ !!str : bar,
+}
diff --git a/tests/yaml-1.2-spec-examples/example-7.20 b/tests/yaml-1.2-spec-examples/example-7.20
new file mode 100644
index 0000000..19dc4f5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.20
@@ -0,0 +1,4 @@
+[
+? foo
+ bar : baz
+]
diff --git a/tests/yaml-1.2-spec-examples/example-7.21 b/tests/yaml-1.2-spec-examples/example-7.21
new file mode 100644
index 0000000..fdff3b5
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.21
@@ -0,0 +1,3 @@
+- [ YAML : separate ]
+- [ : empty key entry ]
+- [ {JSON: like}:adjacent ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.22 b/tests/yaml-1.2-spec-examples/example-7.22
new file mode 100644
index 0000000..85c6ccb
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.22
@@ -0,0 +1,3 @@
+[ foo
+ bar: invalid,
+ "foo...>1K characters...bar": invalid ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.23 b/tests/yaml-1.2-spec-examples/example-7.23
new file mode 100644
index 0000000..f709dc8
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.23
@@ -0,0 +1,5 @@
+- [ a, b ]
+- { a: b }
+- "a"
+- 'b'
+- c
diff --git a/tests/yaml-1.2-spec-examples/example-7.24 b/tests/yaml-1.2-spec-examples/example-7.24
new file mode 100644
index 0000000..db4007f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.24
@@ -0,0 +1,5 @@
+- !!str "a"
+- 'b'
+- &anchor "c"
+- *anchor
+- !!str
diff --git a/tests/yaml-1.2-spec-examples/example-7.3 b/tests/yaml-1.2-spec-examples/example-7.3
new file mode 100644
index 0000000..f46900d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.3
@@ -0,0 +1,4 @@
+{
+ ? foo :,
+ : bar,
+}
diff --git a/tests/yaml-1.2-spec-examples/example-7.4 b/tests/yaml-1.2-spec-examples/example-7.4
new file mode 100644
index 0000000..1b7a550
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.4
@@ -0,0 +1,3 @@
+"implicit block key" : [
+ "implicit flow key" : value,
+ ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.5 b/tests/yaml-1.2-spec-examples/example-7.5
new file mode 100644
index 0000000..eda4b49
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.5
@@ -0,0 +1,5 @@
+"folded
+to a space,
+
+to a line feed, or \
+ \ non-content"
diff --git a/tests/yaml-1.2-spec-examples/example-7.6 b/tests/yaml-1.2-spec-examples/example-7.6
new file mode 100644
index 0000000..3d8b76d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.6
@@ -0,0 +1,4 @@
+" 1st non-empty
+
+ 2nd non-empty
+ 3rd non-empty "
diff --git a/tests/yaml-1.2-spec-examples/example-7.7 b/tests/yaml-1.2-spec-examples/example-7.7
new file mode 100644
index 0000000..b038078
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.7
@@ -0,0 +1 @@
+ 'here''s to "quotes"'
diff --git a/tests/yaml-1.2-spec-examples/example-7.8 b/tests/yaml-1.2-spec-examples/example-7.8
new file mode 100644
index 0000000..f1baf58
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.8
@@ -0,0 +1,3 @@
+'implicit block key' : [
+ 'implicit flow key' : value,
+ ]
diff --git a/tests/yaml-1.2-spec-examples/example-7.9 b/tests/yaml-1.2-spec-examples/example-7.9
new file mode 100644
index 0000000..6dd946e
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-7.9
@@ -0,0 +1,4 @@
+' 1st non-empty
+
+ 2nd non-empty
+ 3rd non-empty '
diff --git a/tests/yaml-1.2-spec-examples/example-8.1 b/tests/yaml-1.2-spec-examples/example-8.1
new file mode 100644
index 0000000..fea9c8b
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.1
@@ -0,0 +1,10 @@
+- | # Empty header
+ literal
+- >1 # Indentation indicator
+ folded
+- |+ # Chomping indicator
+ keep
+
+- >1- # Both indicators
+ strip
+
diff --git a/tests/yaml-1.2-spec-examples/example-8.10 b/tests/yaml-1.2-spec-examples/example-8.10
new file mode 100644
index 0000000..992dd76
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.10
@@ -0,0 +1,16 @@
+>
+
+ folded
+ line
+
+ next
+ line
+ * bullet
+
+ * list
+ * lines
+
+ last
+ line
+
+# Comment
diff --git a/tests/yaml-1.2-spec-examples/example-8.11 b/tests/yaml-1.2-spec-examples/example-8.11
new file mode 100644
index 0000000..992dd76
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.11
@@ -0,0 +1,16 @@
+>
+
+ folded
+ line
+
+ next
+ line
+ * bullet
+
+ * list
+ * lines
+
+ last
+ line
+
+# Comment
diff --git a/tests/yaml-1.2-spec-examples/example-8.12 b/tests/yaml-1.2-spec-examples/example-8.12
new file mode 100644
index 0000000..bd226b1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.12
@@ -0,0 +1,16 @@
+>
+
+ folded
+ line
+
+ next
+ line
+ * bullet
+
+ * list
+ * line
+
+ last
+ line
+
+# Comment
diff --git a/tests/yaml-1.2-spec-examples/example-8.13 b/tests/yaml-1.2-spec-examples/example-8.13
new file mode 100644
index 0000000..624f219
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.13
@@ -0,0 +1,15 @@
+>
+ folded
+ line
+
+ next
+ line
+ * bullet
+
+ * list
+ * line
+
+ last
+ line
+
+# Comment
diff --git a/tests/yaml-1.2-spec-examples/example-8.14 b/tests/yaml-1.2-spec-examples/example-8.14
new file mode 100644
index 0000000..d2f2ccf
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.14
@@ -0,0 +1,3 @@
+block sequence:
+ - one
+ - two : three
diff --git a/tests/yaml-1.2-spec-examples/example-8.15 b/tests/yaml-1.2-spec-examples/example-8.15
new file mode 100644
index 0000000..35ac923
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.15
@@ -0,0 +1,6 @@
+- # Empty
+- |
+ block node
+- - one # Compact
+ - two # sequence
+- one: two # Compact mapping
diff --git a/tests/yaml-1.2-spec-examples/example-8.16 b/tests/yaml-1.2-spec-examples/example-8.16
new file mode 100644
index 0000000..2ef9084
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.16
@@ -0,0 +1,2 @@
+block mapping:
+ key: value
diff --git a/tests/yaml-1.2-spec-examples/example-8.17 b/tests/yaml-1.2-spec-examples/example-8.17
new file mode 100644
index 0000000..cb0cfd0
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.17
@@ -0,0 +1,5 @@
+? explicit key # Empty value
+? |
+ block key
+: - one # Explicit compact
+ - two # block value
diff --git a/tests/yaml-1.2-spec-examples/example-8.18 b/tests/yaml-1.2-spec-examples/example-8.18
new file mode 100644
index 0000000..c819512
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.18
@@ -0,0 +1,4 @@
+plain key: in-line value
+: # Both empty
+"quoted key":
+- entry
diff --git a/tests/yaml-1.2-spec-examples/example-8.19 b/tests/yaml-1.2-spec-examples/example-8.19
new file mode 100644
index 0000000..d675cfd
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.19
@@ -0,0 +1,3 @@
+- sun: yellow
+- ? earth: blue
+ : moon: white
diff --git a/tests/yaml-1.2-spec-examples/example-8.2 b/tests/yaml-1.2-spec-examples/example-8.2
new file mode 100644
index 0000000..39bee04
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.2
@@ -0,0 +1,11 @@
+- |
+ detected
+- >
+
+
+ # detected
+- |1
+ explicit
+- >
+
+ detected
diff --git a/tests/yaml-1.2-spec-examples/example-8.20 b/tests/yaml-1.2-spec-examples/example-8.20
new file mode 100644
index 0000000..a3f13ae
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.20
@@ -0,0 +1,6 @@
+-
+ "flow in block"
+- >
+ Block scalar
+- !!map # Block collection
+ foo : bar
diff --git a/tests/yaml-1.2-spec-examples/example-8.21 b/tests/yaml-1.2-spec-examples/example-8.21
new file mode 100644
index 0000000..f86be74
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.21
@@ -0,0 +1,6 @@
+literal: |2
+ value
+folded:
+ !foo
+ >1
+ value
diff --git a/tests/yaml-1.2-spec-examples/example-8.22 b/tests/yaml-1.2-spec-examples/example-8.22
new file mode 100644
index 0000000..5c59669
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.22
@@ -0,0 +1,6 @@
+sequence: !!seq
+- entry
+- !!seq
+ - nested
+mapping: !!map
+ foo: bar
diff --git a/tests/yaml-1.2-spec-examples/example-8.3 b/tests/yaml-1.2-spec-examples/example-8.3
new file mode 100644
index 0000000..46edf9f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.3
@@ -0,0 +1,8 @@
+- |
+
+ text
+- >
+ text
+ text
+- |2
+ text
diff --git a/tests/yaml-1.2-spec-examples/example-8.4 b/tests/yaml-1.2-spec-examples/example-8.4
new file mode 100644
index 0000000..fa6190f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.4
@@ -0,0 +1,6 @@
+strip: |-
+ text
+clip: |
+ text
+keep: |+
+ text
diff --git a/tests/yaml-1.2-spec-examples/example-8.5 b/tests/yaml-1.2-spec-examples/example-8.5
new file mode 100644
index 0000000..32fa08f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.5
@@ -0,0 +1,19 @@
+ # Strip
+ # Comments:
+strip: |-
+ # text
+
+ # Clip
+ # comments:
+
+clip: |
+ # text
+
+ # Keep
+ # comments:
+
+keep: |+
+ # text
+
+ # Trail
+ # comments.
diff --git a/tests/yaml-1.2-spec-examples/example-8.6 b/tests/yaml-1.2-spec-examples/example-8.6
new file mode 100644
index 0000000..de0b64b
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.6
@@ -0,0 +1,6 @@
+strip: >-
+
+clip: >
+
+keep: |+
+
diff --git a/tests/yaml-1.2-spec-examples/example-8.7 b/tests/yaml-1.2-spec-examples/example-8.7
new file mode 100644
index 0000000..7fa415f
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.7
@@ -0,0 +1,4 @@
+|
+ literal
+ text
+
diff --git a/tests/yaml-1.2-spec-examples/example-8.8 b/tests/yaml-1.2-spec-examples/example-8.8
new file mode 100644
index 0000000..9d537cb
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.8
@@ -0,0 +1,9 @@
+|
+
+
+ literal
+
+
+ text
+
+ # Comment
diff --git a/tests/yaml-1.2-spec-examples/example-8.9 b/tests/yaml-1.2-spec-examples/example-8.9
new file mode 100644
index 0000000..c016ca9
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-8.9
@@ -0,0 +1,4 @@
+>
+ folded
+ text
+
diff --git a/tests/yaml-1.2-spec-examples/example-9.1 b/tests/yaml-1.2-spec-examples/example-9.1
new file mode 100644
index 0000000..59b6591
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.1
@@ -0,0 +1,3 @@
+# Comment
+# lines
+Document
diff --git a/tests/yaml-1.2-spec-examples/example-9.2 b/tests/yaml-1.2-spec-examples/example-9.2
new file mode 100644
index 0000000..886e574
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.2
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+Document
+... # Suffix
diff --git a/tests/yaml-1.2-spec-examples/example-9.3 b/tests/yaml-1.2-spec-examples/example-9.3
new file mode 100644
index 0000000..57423e9
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.3
@@ -0,0 +1,7 @@
+Bare
+document
+...
+# No document
+...
+|
+%!PS-Adobe-2.0 # Not the first line
diff --git a/tests/yaml-1.2-spec-examples/example-9.4 b/tests/yaml-1.2-spec-examples/example-9.4
new file mode 100644
index 0000000..bc363b1
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.4
@@ -0,0 +1,7 @@
+---
+{ matches
+% : 20 }
+...
+---
+# Empty
+...
diff --git a/tests/yaml-1.2-spec-examples/example-9.5 b/tests/yaml-1.2-spec-examples/example-9.5
new file mode 100644
index 0000000..de2463d
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.5
@@ -0,0 +1,8 @@
+%YAML 1.2
+--- |
+%!PS-Adobe-2.0
+...
+%YAML1.2
+---
+# Empty
+...
diff --git a/tests/yaml-1.2-spec-examples/example-9.6 b/tests/yaml-1.2-spec-examples/example-9.6
new file mode 100644
index 0000000..52bd345
--- /dev/null
+++ b/tests/yaml-1.2-spec-examples/example-9.6
@@ -0,0 +1,7 @@
+Document
+---
+# Empty
+...
+%YAML 1.2
+---
+matches %: 20