llvm.org GIT mirror llvm / 9e31c0c
YAML: Enable the YAMLParser tests. This commit enables the tests located in test/YAMLParser directory. Those tests were never actually enabled, as llvm-lit didn't pick up the files with the 'data' extension. The commit renames those test files to files with the 'test' extension so that llvm-lit would find them. This commit also modifies yaml-bench so that it returns an error status if an error occurred during parsing. It also adds the '-use-color' command line option to yaml-bench (to make sure that file check matches the error messages in the output stream). This commit modifies some of the renamed tests so that they wouldn't fail. It gets rid of XFAILs and uses the 'not' command instead for some of the tests that have to fail during parsing. This commit also adds some 'FIXME' comments to a couple of tests that are supposed to fail but currently pass because of various bugs in the implementation of the yaml parser. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9448 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236754 91177308-0d34-0410-b5e6-96231b3b80d8 Alex Lorenz 4 years ago
345 changed file(s) with 1516 addition(s) and 1504 deletion(s). Raw diff Collapse all Expand all
7575 class Stream {
7676 public:
7777 /// \brief This keeps a reference to the string referenced by \p Input.
78 Stream(StringRef Input, SourceMgr &);
79
80 Stream(MemoryBufferRef InputBuffer, SourceMgr &);
78 Stream(StringRef Input, SourceMgr &, bool ShowColors = true);
79
80 Stream(MemoryBufferRef InputBuffer, SourceMgr &, bool ShowColors = true);
8181 ~Stream();
8282
8383 document_iterator begin();
259259 /// @brief Scans YAML tokens from a MemoryBuffer.
260260 class Scanner {
261261 public:
262 Scanner(StringRef Input, SourceMgr &SM);
263 Scanner(MemoryBufferRef Buffer, SourceMgr &SM_);
262 Scanner(StringRef Input, SourceMgr &SM, bool ShowColors = true);
263 Scanner(MemoryBufferRef Buffer, SourceMgr &SM_, bool ShowColors = true);
264264
265265 /// @brief Parse the next token and return it without popping it.
266266 Token &peekNext();
270270
271271 void printError(SMLoc Loc, SourceMgr::DiagKind Kind, const Twine &Message,
272272 ArrayRef Ranges = None) {
273 SM.PrintMessage(Loc, Kind, Message, Ranges);
273 SM.PrintMessage(Loc, Kind, Message, Ranges, /* FixIts= */ None, ShowColors);
274274 }
275275
276276 void setError(const Twine &Message, StringRef::iterator Position) {
503503
504504 /// @brief True if an error has occurred.
505505 bool Failed;
506
507 /// @brief Should colors be used when printing out the diagnostic messages?
508 bool ShowColors;
506509
507510 /// @brief Queue of tokens. This is required to queue up tokens while looking
508511 /// for the end of a simple key. And for cases where a single character
705708 return EscapedInput;
706709 }
707710
708 Scanner::Scanner(StringRef Input, SourceMgr &sm) : SM(sm) {
711 Scanner::Scanner(StringRef Input, SourceMgr &sm, bool ShowColors)
712 : SM(sm), ShowColors(ShowColors) {
709713 init(MemoryBufferRef(Input, "YAML"));
710714 }
711715
712 Scanner::Scanner(MemoryBufferRef Buffer, SourceMgr &SM_) : SM(SM_) {
716 Scanner::Scanner(MemoryBufferRef Buffer, SourceMgr &SM_, bool ShowColors)
717 : SM(SM_), ShowColors(ShowColors) {
713718 init(Buffer);
714719 }
715720
15241529 return false;
15251530 }
15261531
1527 Stream::Stream(StringRef Input, SourceMgr &SM)
1528 : scanner(new Scanner(Input, SM)), CurrentDoc() {}
1529
1530 Stream::Stream(MemoryBufferRef InputBuffer, SourceMgr &SM)
1531 : scanner(new Scanner(InputBuffer, SM)), CurrentDoc() {}
1532 Stream::Stream(StringRef Input, SourceMgr &SM, bool ShowColors)
1533 : scanner(new Scanner(Input, SM, ShowColors)), CurrentDoc() {}
1534
1535 Stream::Stream(MemoryBufferRef InputBuffer, SourceMgr &SM, bool ShowColors)
1536 : scanner(new Scanner(InputBuffer, SM, ShowColors)), CurrentDoc() {}
15321537
15331538 Stream::~Stream() {}
15341539
+0
-6
test/YAMLParser/bool.data less more
None # RUN: yaml-bench -canonical %s
1
2 - yes
3 - NO
4 - True
5 - on
0 # RUN: yaml-bench -canonical %s
1
2 - yes
3 - NO
4 - True
5 - on
+0
-11
test/YAMLParser/construct-bool.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: yes
3 answer: NO
4 logical: True
5 option: on
6
7
8 but:
9 y: is a string
10 n: is a string
0 # RUN: yaml-bench -canonical %s
1
2 canonical: yes
3 answer: NO
4 logical: True
5 option: on
6
7
8 but:
9 y: is a string
10 n: is a string
+0
-28
test/YAMLParser/construct-custom.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 - !tag1
4 x: 1
5 - !tag1
6 x: 1
7 'y': 2
8 z: 3
9 - !tag2
10 10
11 - !tag2
12 =: 10
13 'y': 20
14 z: 30
15 - !tag3
16 x: 1
17 - !tag3
18 x: 1
19 'y': 2
20 z: 3
21 - !tag3
22 =: 1
23 'y': 2
24 z: 3
25 - !foo
26 my-parameter: foo
27 my-another-parameter: [1,2,3]
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 - !tag1
4 x: 1
5 - !tag1
6 x: 1
7 'y': 2
8 z: 3
9 - !tag2
10 10
11 - !tag2
12 =: 10
13 'y': 20
14 z: 30
15 - !tag3
16 x: 1
17 - !tag3
18 x: 1
19 'y': 2
20 z: 3
21 - !tag3
22 =: 1
23 'y': 2
24 z: 3
25 - !foo
26 my-parameter: foo
27 my-another-parameter: [1,2,3]
+0
-8
test/YAMLParser/construct-float.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 6.8523015e+5
3 exponential: 685.230_15e+03
4 fixed: 685_230.15
5 sexagesimal: 190:20:30.15
6 negative infinity: -.inf
7 not a number: .NaN
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 6.8523015e+5
3 exponential: 685.230_15e+03
4 fixed: 685_230.15
5 sexagesimal: 190:20:30.15
6 negative infinity: -.inf
7 not a number: .NaN
+0
-8
test/YAMLParser/construct-int.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 685230
3 decimal: +685_230
4 octal: 02472256
5 hexadecimal: 0x_0A_74_AE
6 binary: 0b1010_0111_0100_1010_1110
7 sexagesimal: 190:20:30
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 685230
3 decimal: +685_230
4 octal: 02472256
5 hexadecimal: 0x_0A_74_AE
6 binary: 0b1010_0111_0100_1010_1110
7 sexagesimal: 190:20:30
+0
-8
test/YAMLParser/construct-map.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Unordered set of key: value pairs.
3 Block style: !!map
4 Clark : Evans
5 Brian : Ingerson
6 Oren : Ben-Kiki
7 Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }
0 # RUN: yaml-bench -canonical %s
1
2 # Unordered set of key: value pairs.
3 Block style: !!map
4 Clark : Evans
5 Brian : Ingerson
6 Oren : Ben-Kiki
7 Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }
+0
-29
test/YAMLParser/construct-merge.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 - &CENTER { x: 1, 'y': 2 }
4 - &LEFT { x: 0, 'y': 2 }
5 - &BIG { r: 10 }
6 - &SMALL { r: 1 }
7
8 # All the following maps are equal:
9
10 - # Explicit keys
11 x: 1
12 'y': 2
13 r: 10
14 label: center/big
15
16 - # Merge one map
17 << : *CENTER
18 r: 10
19 label: center/big
20
21 - # Merge multiple maps
22 << : [ *CENTER, *BIG ]
23 label: center/big
24
25 - # Override
26 << : [ *BIG, *LEFT, *SMALL ]
27 x: 1
28 label: center/big
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 - &CENTER { x: 1, 'y': 2 }
4 - &LEFT { x: 0, 'y': 2 }
5 - &BIG { r: 10 }
6 - &SMALL { r: 1 }
7
8 # All the following maps are equal:
9
10 - # Explicit keys
11 x: 1
12 'y': 2
13 r: 10
14 label: center/big
15
16 - # Merge one map
17 << : *CENTER
18 r: 10
19 label: center/big
20
21 - # Merge multiple maps
22 << : [ *CENTER, *BIG ]
23 label: center/big
24
25 - # Override
26 << : [ *BIG, *LEFT, *SMALL ]
27 x: 1
28 label: center/big
+0
-20
test/YAMLParser/construct-null.data less more
None # RUN: yaml-bench -canonical %s
1
2 # A document may be null.
3 ---
4 ---
5 # This mapping has four keys,
6 # one has a value.
7 empty:
8 canonical: ~
9 english: null
10 ~: null key
11 ---
12 # This sequence has five
13 # entries, two have values.
14 sparse:
15 - ~
16 - 2nd entry
17 -
18 - 4th entry
19 - Null
0 # RUN: yaml-bench -canonical %s
1
2 # A document may be null.
3 ---
4 ---
5 # This mapping has four keys,
6 # one has a value.
7 empty:
8 canonical: ~
9 english: null
10 ~: null key
11 ---
12 # This sequence has five
13 # entries, two have values.
14 sparse:
15 - ~
16 - 2nd entry
17 -
18 - 4th entry
19 - Null
+0
-10
test/YAMLParser/construct-omap.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed ordered map (dictionary).
3 Bestiary: !!omap
4 - aardvark: African pig-like ant eater. Ugly.
5 - anteater: South-American ant eater. Two species.
6 - anaconda: South-American constrictor snake. Scaly.
7 # Etc.
8 # Flow style
9 Numbers: !!omap [ one: 1, two: 2, three : 3 ]
0 # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed ordered map (dictionary).
3 Bestiary: !!omap
4 - aardvark: African pig-like ant eater. Ugly.
5 - anteater: South-American ant eater. Two species.
6 - anaconda: South-American constrictor snake. Scaly.
7 # Etc.
8 # Flow style
9 Numbers: !!omap [ one: 1, two: 2, three : 3 ]
+0
-9
test/YAMLParser/construct-pairs.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed pairs.
3 Block tasks: !!pairs
4 - meeting: with team.
5 - meeting: with boss.
6 - break: lunch.
7 - meeting: with client.
8 Flow tasks: !!pairs [ meeting: with team, meeting: with boss ]
0 # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed pairs.
3 Block tasks: !!pairs
4 - meeting: with team.
5 - meeting: with boss.
6 - break: lunch.
7 - meeting: with client.
8 Flow tasks: !!pairs [ meeting: with team, meeting: with boss ]
+0
-17
test/YAMLParser/construct-seq.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Ordered sequence of nodes
3 Block style: !!seq
4 - Mercury # Rotates - no light/dark sides.
5 - Venus # Deadliest. Aptly named.
6 - Earth # Mostly dirt.
7 - Mars # Seems empty.
8 - Jupiter # The king.
9 - Saturn # Pretty.
10 - Uranus # Where the sun hardly shines.
11 - Neptune # Boring. No rings.
12 - Pluto # You call this a planet?
13 Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
14 Jupiter, Saturn, Uranus, Neptune, # Gas
15 Pluto ] # Overrated
16
0 # RUN: yaml-bench -canonical %s
1
2 # Ordered sequence of nodes
3 Block style: !!seq
4 - Mercury # Rotates - no light/dark sides.
5 - Venus # Deadliest. Aptly named.
6 - Earth # Mostly dirt.
7 - Mars # Seems empty.
8 - Jupiter # The king.
9 - Saturn # Pretty.
10 - Uranus # Where the sun hardly shines.
11 - Neptune # Boring. No rings.
12 - Pluto # You call this a planet?
13 Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
14 Jupiter, Saturn, Uranus, Neptune, # Gas
15 Pluto ] # Overrated
16
+0
-9
test/YAMLParser/construct-set.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed set.
3 baseball players: !!set
4 ? Mark McGwire
5 ? Sammy Sosa
6 ? Ken Griffey
7 # Flow style
8 baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
0 # RUN: yaml-bench -canonical %s
1
2 # Explicitly typed set.
3 baseball players: !!set
4 ? Mark McGwire
5 ? Sammy Sosa
6 ? Ken Griffey
7 # Flow style
8 baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
+0
-3
test/YAMLParser/construct-str-ascii.data less more
None # RUN: yaml-bench -canonical %s
1
2 --- !!str "ascii string"
0 # RUN: yaml-bench -canonical %s
1
2 --- !!str "ascii string"
+0
-3
test/YAMLParser/construct-str.data less more
None # RUN: yaml-bench -canonical %s
1
2 string: abcd
0 # RUN: yaml-bench -canonical %s
1
2 string: abcd
+0
-7
test/YAMLParser/construct-timestamp.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 2001-12-15T02:59:43.1Z
3 valid iso8601: 2001-12-14t21:59:43.10-05:00
4 space separated: 2001-12-14 21:59:43.10 -5
5 no time zone (Z): 2001-12-15 2:59:43.10
6 date (00:00:00Z): 2002-12-14
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 2001-12-15T02:59:43.1Z
3 valid iso8601: 2001-12-14t21:59:43.10-05:00
4 space separated: 2001-12-14 21:59:43.10 -5
5 no time zone (Z): 2001-12-15 2:59:43.10
6 date (00:00:00Z): 2002-12-14
+0
-12
test/YAMLParser/construct-value.data less more
None # RUN: yaml-bench -canonical %s
1
2 --- # Old schema
3 link with:
4 - library1.dll
5 - library2.dll
6 --- # New schema
7 link with:
8 - = : library1.dll
9 version: 1.2
10 - = : library2.dll
11 version: 2.3
0 # RUN: yaml-bench -canonical %s
1
2 --- # Old schema
3 link with:
4 - library1.dll
5 - library2.dll
6 --- # New schema
7 link with:
8 - = : library1.dll
9 version: 1.2
10 - = : library2.dll
11 version: 2.3
+0
-5
test/YAMLParser/duplicate-key.former-loader-error.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 foo: bar
4 foo: baz
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 foo: bar
4 foo: baz
+0
-8
test/YAMLParser/duplicate-mapping-key.former-loader-error.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 &anchor foo:
4 foo: bar
5 *anchor: duplicate key
6 baz: bat
7 *anchor: duplicate key
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 &anchor foo:
4 foo: bar
5 *anchor: duplicate key
6 baz: bat
7 *anchor: duplicate key
+0
-6
test/YAMLParser/duplicate-merge-key.former-loader-error.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 <<: {x: 1, y: 2}
4 foo: bar
5 <<: {z: 3, t: 4}
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 <<: {x: 1, y: 2}
4 foo: bar
5 <<: {z: 3, t: 4}
+0
-6
test/YAMLParser/duplicate-value-key.former-loader-error.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 =: 1
4 foo: bar
5 =: 2
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 =: 1
4 foo: bar
5 =: 2
+0
-6
test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 ? |-
3 foo
4 : |-
5 bar
0 # RUN: yaml-bench -canonical %s
1
2 ? |-
3 foo
4 : |-
5 bar
+0
-2
test/YAMLParser/empty-document-bug.data less more
None # RUN: yaml-bench -canonical %s
1
0 # RUN: yaml-bench -canonical %s
1
+0
-8
test/YAMLParser/float.data less more
None # RUN: yaml-bench -canonical %s
1
2 - 6.8523015e+5
3 - 685.230_15e+03
4 - 685_230.15
5 - 190:20:30.15
6 - -.inf
7 - .NaN
0 # RUN: yaml-bench -canonical %s
1
2 - 6.8523015e+5
3 - 685.230_15e+03
4 - 685_230.15
5 - 190:20:30.15
6 - -.inf
7 - .NaN
+0
-8
test/YAMLParser/int.data less more
None # RUN: yaml-bench -canonical %s
1
2 - 685230
3 - +685_230
4 - 02472256
5 - 0x_0A_74_AE
6 - 0b1010_0111_0100_1010_1110
7 - 190:20:30
0 # RUN: yaml-bench -canonical %s
1
2 - 685230
3 - +685_230
4 - 02472256
5 - 0x_0A_74_AE
6 - 0b1010_0111_0100_1010_1110
7 - 190:20:30
+0
-4
test/YAMLParser/invalid-single-quote-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 - "foo 'bar'"
3 - "foo\n'bar'"
0 # RUN: yaml-bench -canonical %s
1
2 - "foo 'bar'"
3 - "foo\n'bar'"
+0
-3
test/YAMLParser/merge.data less more
None # RUN: yaml-bench -canonical %s
1
2 - <<
0 # RUN: yaml-bench -canonical %s
1
2 - <<
+0
-3
test/YAMLParser/more-floats.data less more
None # RUN: yaml-bench -canonical %s
1
2 [0.0, +1.0, -1.0, +.inf, -.inf, .nan, .nan]
0 # RUN: yaml-bench -canonical %s
1
2 [0.0, +1.0, -1.0, +.inf, -.inf, .nan, .nan]
+0
-3
test/YAMLParser/negative-float-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 -1.0
0 # RUN: yaml-bench -canonical %s
1
2 -1.0
+0
-5
test/YAMLParser/null.data less more
None # RUN: yaml-bench -canonical %s
1
2 -
3 - ~
4 - null
0 # RUN: yaml-bench -canonical %s
1
2 -
3 - ~
4 - null
+0
-32
test/YAMLParser/resolver.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 "this scalar should be selected"
4 ---
5 key11: !foo
6 key12:
7 is: [selected]
8 key22:
9 key13: [not, selected]
10 key23: [not, selected]
11 key32:
12 key31: [not, selected]
13 key32: [not, selected]
14 key33: {not: selected}
15 key21: !bar
16 - not selected
17 - selected
18 - not selected
19 key31: !baz
20 key12:
21 key13:
22 key14: {selected}
23 key23:
24 key14: [not, selected]
25 key33:
26 key14: {selected}
27 key24: {not: selected}
28 key22:
29 - key14: {selected}
30 key24: {not: selected}
31 - key14: {selected}
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 "this scalar should be selected"
4 ---
5 key11: !foo
6 key12:
7 is: [selected]
8 key22:
9 key13: [not, selected]
10 key23: [not, selected]
11 key32:
12 key31: [not, selected]
13 key32: [not, selected]
14 key33: {not: selected}
15 key21: !bar
16 - not selected
17 - selected
18 - not selected
19 key31: !baz
20 key12:
21 key13:
22 key14: {selected}
23 key23:
24 key14: [not, selected]
25 key33:
26 key14: {selected}
27 key24: {not: selected}
28 key22:
29 - key14: {selected}
30 key24: {not: selected}
31 - key14: {selected}
+0
-10
test/YAMLParser/run-parser-crash-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 - Harry Potter and the Prisoner of Azkaban
4 - Harry Potter and the Goblet of Fire
5 - Harry Potter and the Order of the Phoenix
6 ---
7 - Memoirs Found in a Bathtub
8 - Snow Crash
9 - Ghost World
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 - Harry Potter and the Prisoner of Azkaban
4 - Harry Potter and the Goblet of Fire
5 - Harry Potter and the Order of the Phoenix
6 ---
7 - Memoirs Found in a Bathtub
8 - Snow Crash
9 - Ghost World
+0
-5
test/YAMLParser/scan-document-end-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Ticket #4
3 ---
4 ...
0 # RUN: yaml-bench -canonical %s
1
2 # Ticket #4
3 ---
4 ...
+0
-5
test/YAMLParser/scan-line-break-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 foo:
3 bar
4 baz
0 # RUN: yaml-bench -canonical %s
1
2 foo:
3 bar
4 baz
+0
-3
test/YAMLParser/single-dot-is-not-float-bug.data less more
None # RUN: yaml-bench -canonical %s
1
2 .
0 # RUN: yaml-bench -canonical %s
1
2 .
+0
-19
test/YAMLParser/sloppy-indentation.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 in the block context:
4 indentation should be kept: {
5 but in the flow context: [
6 it may be violated]
7 }
8 ---
9 the parser does not require scalars
10 to be indented with at least one space
11 ...
12 ---
13 "the parser does not require scalars
14 to be indented with at least one space"
15 ---
16 foo:
17 bar: 'quoted scalars
18 may not adhere indentation'
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 in the block context:
4 indentation should be kept: {
5 but in the flow context: [
6 it may be violated]
7 }
8 ---
9 the parser does not require scalars
10 to be indented with at least one space
11 ...
12 ---
13 "the parser does not require scalars
14 to be indented with at least one space"
15 ---
16 foo:
17 bar: 'quoted scalars
18 may not adhere indentation'
+0
-5
test/YAMLParser/spec-02-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 - Mark McGwire
3 - Sammy Sosa
4 - Ken Griffey
0 # RUN: yaml-bench -canonical %s
1
2 - Mark McGwire
3 - Sammy Sosa
4 - Ken Griffey
+0
-5
test/YAMLParser/spec-02-02.data less more
None # RUN: yaml-bench -canonical %s
1
2 hr: 65 # Home runs
3 avg: 0.278 # Batting average
4 rbi: 147 # Runs Batted In
0 # RUN: yaml-bench -canonical %s
1
2 hr: 65 # Home runs
3 avg: 0.278 # Batting average
4 rbi: 147 # Runs Batted In
+0
-10
test/YAMLParser/spec-02-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 american:
3 - Boston Red Sox
4 - Detroit Tigers
5 - New York Yankees
6 national:
7 - New York Mets
8 - Chicago Cubs
9 - Atlanta Braves
0 # RUN: yaml-bench -canonical %s
1
2 american:
3 - Boston Red Sox
4 - Detroit Tigers
5 - New York Yankees
6 national:
7 - New York Mets
8 - Chicago Cubs
9 - Atlanta Braves
+0
-10
test/YAMLParser/spec-02-04.data less more
None # RUN: yaml-bench -canonical %s
1
2 -
3 name: Mark McGwire
4 hr: 65
5 avg: 0.278
6 -
7 name: Sammy Sosa
8 hr: 63
9 avg: 0.288
0 # RUN: yaml-bench -canonical %s
1
2 -
3 name: Mark McGwire
4 hr: 65
5 avg: 0.278
6 -
7 name: Sammy Sosa
8 hr: 63
9 avg: 0.288
+0
-5
test/YAMLParser/spec-02-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 - [name , hr, avg ]
3 - [Mark McGwire, 65, 0.278]
4 - [Sammy Sosa , 63, 0.288]
0 # RUN: yaml-bench -canonical %s
1
2 - [name , hr, avg ]
3 - [Mark McGwire, 65, 0.278]
4 - [Sammy Sosa , 63, 0.288]
+0
-7
test/YAMLParser/spec-02-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 Mark McGwire: {hr: 65, avg: 0.278}
3 Sammy Sosa: {
4 hr: 63,
5 avg: 0.288
6 }
0 # RUN: yaml-bench -canonical %s
1
2 Mark McGwire: {hr: 65, avg: 0.278}
3 Sammy Sosa: {
4 hr: 63,
5 avg: 0.288
6 }
+0
-12
test/YAMLParser/spec-02-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Ranking of 1998 home runs
3 ---
4 - Mark McGwire
5 - Sammy Sosa
6 - Ken Griffey
7
8 # Team ranking
9 ---
10 - Chicago Cubs
11 - St Louis Cardinals
0 # RUN: yaml-bench -canonical %s
1
2 # Ranking of 1998 home runs
3 ---
4 - Mark McGwire
5 - Sammy Sosa
6 - Ken Griffey
7
8 # Team ranking
9 ---
10 - Chicago Cubs
11 - St Louis Cardinals
+0
-12
test/YAMLParser/spec-02-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 time: 20:03:20
4 player: Sammy Sosa
5 action: strike (miss)
6 ...
7 ---
8 time: 20:03:47
9 player: Sammy Sosa
10 action: grand slam
11 ...
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 time: 20:03:20
4 player: Sammy Sosa
5 action: strike (miss)
6 ...
7 ---
8 time: 20:03:47
9 player: Sammy Sosa
10 action: grand slam
11 ...
+0
-10
test/YAMLParser/spec-02-09.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 hr: # 1998 hr ranking
4 - Mark McGwire
5 - Sammy Sosa
6 rbi:
7 # 1998 rbi ranking
8 - Sammy Sosa
9 - Ken Griffey
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 hr: # 1998 hr ranking
4 - Mark McGwire
5 - Sammy Sosa
6 rbi:
7 # 1998 rbi ranking
8 - Sammy Sosa
9 - Ken Griffey
+0
-10
test/YAMLParser/spec-02-10.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 hr:
4 - Mark McGwire
5 # Following node labeled SS
6 - &SS Sammy Sosa
7 rbi:
8 - *SS # Subsequent occurrence
9 - Ken Griffey
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 hr:
4 - Mark McGwire
5 # Following node labeled SS
6 - &SS Sammy Sosa
7 rbi:
8 - *SS # Subsequent occurrence
9 - Ken Griffey
+0
-11
test/YAMLParser/spec-02-11.data less more
None # RUN: yaml-bench -canonical %s
1
2 ? - Detroit Tigers
3 - Chicago cubs
4 :
5 - 2001-07-23
6
7 ? [ New York Yankees,
8 Atlanta Braves ]
9 : [ 2001-07-02, 2001-08-12,
10 2001-08-14 ]
0 # RUN: yaml-bench -canonical %s
1
2 ? - Detroit Tigers
3 - Chicago cubs
4 :
5 - 2001-07-23
6
7 ? [ New York Yankees,
8 Atlanta Braves ]
9 : [ 2001-07-02, 2001-08-12,
10 2001-08-14 ]
+0
-10
test/YAMLParser/spec-02-12.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 # products purchased
4 - item : Super Hoop
5 quantity: 1
6 - item : Basketball
7 quantity: 4
8 - item : Big Shoes
9 quantity: 1
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 # products purchased
4 - item : Super Hoop
5 quantity: 1
6 - item : Basketball
7 quantity: 4
8 - item : Big Shoes
9 quantity: 1
+0
-6
test/YAMLParser/spec-02-13.data less more
None # RUN: yaml-bench -canonical %s
1
2 # ASCII Art
3 --- |
4 \//||\/||
5 // || ||__
0 # RUN: yaml-bench -canonical %s
1
2 # ASCII Art
3 --- |
4 \//||\/||
5 // || ||__
+0
-6
test/YAMLParser/spec-02-14.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 Mark McGwire's
4 year was crippled
5 by a knee injury.
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 Mark McGwire's
4 year was crippled
5 by a knee injury.
+0
-10
test/YAMLParser/spec-02-15.data less more
None # RUN: yaml-bench -canonical %s
1
2 >
3 Sammy Sosa completed another
4 fine season with great stats.
5
6 63 Home Runs
7 0.288 Batting Average
8
9 What a year!
0 # RUN: yaml-bench -canonical %s
1
2 >
3 Sammy Sosa completed another
4 fine season with great stats.
5
6 63 Home Runs
7 0.288 Batting Average
8
9 What a year!
+0
-9
test/YAMLParser/spec-02-16.data less more
None # RUN: yaml-bench -canonical %s
1
2 name: Mark McGwire
3 accomplishment: >
4 Mark set a major league
5 home run record in 1998.
6 stats: |
7 65 Home Runs
8 0.278 Batting Average
0 # RUN: yaml-bench -canonical %s
1
2 name: Mark McGwire
3 accomplishment: >
4 Mark set a major league
5 home run record in 1998.
6 stats: |
7 65 Home Runs
8 0.278 Batting Average
+0
-16
test/YAMLParser/spec-02-17.data less more
None # RUN: yaml-bench -canonical %s
1
2 unicode: "Sosa did fine.\u263A"
3 control: "\b1998\t1999\t2000\n"
4 hexesc: "\x13\x10 is \r\n"
5
6 single: '"Howdy!" he cried.'
7 quoted: ' # not a ''comment''.'
8 tie-fighter: '|\-*-/|'
9
10 # CHECK: !!str "Sosa did fine.\u263A"
11 # CHECK: !!str "\b1998\t1999\t2000\n"
12 # CHECK: !!str "\x13\x10 is \r\n"
13 # CHECK: !!str "\"Howdy!\" he cried."
14 # CHECK: !!str " # not a 'comment'."
15 # CHECK: !!str "|\\-*-/|"
0 # RUN: yaml-bench -canonical %s
1
2 unicode: "Sosa did fine.\u263A"
3 control: "\b1998\t1999\t2000\n"
4 hexesc: "\x13\x10 is \r\n"
5
6 single: '"Howdy!" he cried.'
7 quoted: ' # not a ''comment''.'
8 tie-fighter: '|\-*-/|'
9
10 # CHECK: !!str "Sosa did fine.\u263A"
11 # CHECK: !!str "\b1998\t1999\t2000\n"
12 # CHECK: !!str "\x13\x10 is \r\n"
13 # CHECK: !!str "\"Howdy!\" he cried."
14 # CHECK: !!str " # not a 'comment'."
15 # CHECK: !!str "|\\-*-/|"
+0
-8
test/YAMLParser/spec-02-18.data less more
None # RUN: yaml-bench -canonical %s
1
2 plain:
3 This unquoted scalar
4 spans many lines.
5
6 quoted: "So does this
7 quoted scalar.\n"
0 # RUN: yaml-bench -canonical %s
1
2 plain:
3 This unquoted scalar
4 spans many lines.
5
6 quoted: "So does this
7 quoted scalar.\n"
+0
-7
test/YAMLParser/spec-02-19.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 12345
3 decimal: +12,345
4 sexagesimal: 3:25:45
5 octal: 014
6 hexadecimal: 0xC
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 12345
3 decimal: +12,345
4 sexagesimal: 3:25:45
5 octal: 014
6 hexadecimal: 0xC
+0
-8
test/YAMLParser/spec-02-20.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 1.23015e+3
3 exponential: 12.3015e+02
4 sexagesimal: 20:30.15
5 fixed: 1,230.15
6 negative infinity: -.inf
7 not a number: .NaN
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 1.23015e+3
3 exponential: 12.3015e+02
4 sexagesimal: 20:30.15
5 fixed: 1,230.15
6 negative infinity: -.inf
7 not a number: .NaN
+0
-6
test/YAMLParser/spec-02-21.data less more
None # RUN: yaml-bench -canonical %s
1
2 null: ~
3 true: y
4 false: n
5 string: '12345'
0 # RUN: yaml-bench -canonical %s
1
2 null: ~
3 true: y
4 false: n
5 string: '12345'
+0
-6
test/YAMLParser/spec-02-22.data less more
None # RUN: yaml-bench -canonical %s
1
2 canonical: 2001-12-15T02:59:43.1Z
3 iso8601: 2001-12-14t21:59:43.10-05:00
4 spaced: 2001-12-14 21:59:43.10 -5
5 date: 2002-12-14
0 # RUN: yaml-bench -canonical %s
1
2 canonical: 2001-12-15T02:59:43.1Z
3 iso8601: 2001-12-14t21:59:43.10-05:00
4 spaced: 2001-12-14 21:59:43.10 -5
5 date: 2002-12-14
+0
-15
test/YAMLParser/spec-02-23.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 not-date: !!str 2002-04-28
4
5 picture: !!binary |
6 R0lGODlhDAAMAIQAAP//9/X
7 17unp5WZmZgAAAOfn515eXv
8 Pz7Y6OjuDg4J+fn5OTk6enp
9 56enmleECcgggoBADs=
10
11 application specific tag: !something |
12 The semantics of the tag
13 above may be different for
14 different documents.
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 not-date: !!str 2002-04-28
4
5 picture: !!binary |
6 R0lGODlhDAAMAIQAAP//9/X
7 17unp5WZmZgAAAOfn515eXv
8 Pz7Y6OjuDg4J+fn5OTk6enp
9 56enmleECcgggoBADs=
10
11 application specific tag: !something |
12 The semantics of the tag
13 above may be different for
14 different documents.
+0
-21
test/YAMLParser/spec-02-24.data less more
None # RUN: yaml-bench -canonical %s | FileCheck %s
1
2 %TAG ! tag:clarkevans.com,2002:
3 --- !shape
4 # Use the ! handle for presenting
5 # tag:clarkevans.com,2002:circle
6 - !circle
7 center: &ORIGIN {x: 73, y: 129}
8 radius: 7
9 - !line
10 start: *ORIGIN
11 finish: { x: 89, y: 102 }
12 - !label
13 start: *ORIGIN
14 color: 0xFFEEBB
15 text: Pretty vector drawing.
16
17 #CHECK: !
18 #CHECK: !
19 #CHECK: !
20 #CHECK: !
0 # RUN: yaml-bench -canonical %s | FileCheck %s
1
2 %TAG ! tag:clarkevans.com,2002:
3 --- !shape
4 # Use the ! handle for presenting
5 # tag:clarkevans.com,2002:circle
6 - !circle
7 center: &ORIGIN {x: 73, y: 129}
8 radius: 7
9 - !line
10 start: *ORIGIN
11 finish: { x: 89, y: 102 }
12 - !label
13 start: *ORIGIN
14 color: 0xFFEEBB
15 text: Pretty vector drawing.
16
17 #CHECK: !
18 #CHECK: !
19 #CHECK: !
20 #CHECK: !
+0
-9
test/YAMLParser/spec-02-25.data less more
None # RUN: yaml-bench -canonical %s
1
2 # sets are represented as a
3 # mapping where each key is
4 # associated with the empty string
5 --- !!set
6 ? Mark McGwire
7 ? Sammy Sosa
8 ? Ken Griff
0 # RUN: yaml-bench -canonical %s
1
2 # sets are represented as a
3 # mapping where each key is
4 # associated with the empty string
5 --- !!set
6 ? Mark McGwire
7 ? Sammy Sosa
8 ? Ken Griff
+0
-9
test/YAMLParser/spec-02-26.data less more
None # RUN: yaml-bench -canonical %s
1
2 # ordered maps are represented as
3 # a sequence of mappings, with
4 # each mapping having one key
5 --- !!omap
6 - Mark McGwire: 65
7 - Sammy Sosa: 63
8 - Ken Griffy: 58
0 # RUN: yaml-bench -canonical %s
1
2 # ordered maps are represented as
3 # a sequence of mappings, with
4 # each mapping having one key
5 --- !!omap
6 - Mark McGwire: 65
7 - Sammy Sosa: 63
8 - Ken Griffy: 58
+0
-31
test/YAMLParser/spec-02-27.data less more
None # RUN: yaml-bench -canonical %s
1
2 --- !
3 invoice: 34843
4 date : 2001-01-23
5 bill-to: &id001
6 given : Chris
7 family : Dumars
8 address:
9 lines: |
10 458 Walkman Dr.
11 Suite #292
12 city : Royal Oak
13 state : MI
14 postal : 48046
15 ship-to: *id001
16 product:
17 - sku : BL394D
18 quantity : 4
19 description : Basketball
20 price : 450.00
21 - sku : BL4438H
22 quantity : 1
23 description : Super Hoop
24 price : 2392.00
25 tax : 251.42
26 total: 4443.52
27 comments:
28 Late afternoon is best.
29 Backup contact is Nancy
30 Billsmer @ 338-4338.
0 # RUN: yaml-bench -canonical %s
1
2 --- !
3 invoice: 34843
4 date : 2001-01-23
5 bill-to: &id001
6 given : Chris
7 family : Dumars
8 address:
9 lines: |
10 458 Walkman Dr.
11 Suite #292
12 city : Royal Oak
13 state : MI
14 postal : 48046
15 ship-to: *id001
16 product:
17 - sku : BL394D
18 quantity : 4
19 description : Basketball
20 price : 450.00
21 - sku : BL4438H
22 quantity : 1
23 description : Super Hoop
24 price : 2392.00
25 tax : 251.42
26 total: 4443.52
27 comments:
28 Late afternoon is best.
29 Backup contact is Nancy
30 Billsmer @ 338-4338.
+0
-28
test/YAMLParser/spec-02-28.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 Time: 2001-11-23 15:01:42 -5
4 User: ed
5 Warning:
6 This is an error message
7 for the log file
8 ---
9 Time: 2001-11-23 15:02:31 -5
10 User: ed
11 Warning:
12 A slightly different error
13 message.
14 ---
15 Date: 2001-11-23 15:03:17 -5
16 User: ed
17 Fatal:
18 Unknown variable "bar"
19 Stack:
20 - file: TopClass.py
21 line: 23
22 code: |
23 x = MoreObject("345\n")
24 - file: MoreClass.py
25 line: 58
26 code: |-
27 foo = bar
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 Time: 2001-11-23 15:01:42 -5
4 User: ed
5 Warning:
6 This is an error message
7 for the log file
8 ---
9 Time: 2001-11-23 15:02:31 -5
10 User: ed
11 Warning:
12 A slightly different error
13 message.
14 ---
15 Date: 2001-11-23 15:03:17 -5
16 User: ed
17 Fatal:
18 Unknown variable "bar"
19 Stack:
20 - file: TopClass.py
21 line: 23
22 code: |
23 x = MoreObject("345\n")
24 - file: MoreClass.py
25 line: 58
26 code: |-
27 foo = bar
+0
-3
test/YAMLParser/spec-05-01-utf8.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Comment only.
0 # RUN: yaml-bench -canonical %s
1
2 # Comment only.
+0
-7
test/YAMLParser/spec-05-02-utf8.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 # Invalid use of BOM
3 # inside a
4 # document.
5
6 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 # Invalid use of BOM
3 # inside a
4 # document.
5
6 # CHECK: error
+0
-9
test/YAMLParser/spec-05-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 sequence:
3 - one
4 - two
5 mapping:
6 ? sky
7 : blue
8 ? sea : green
0 # RUN: yaml-bench -canonical %s
1
2 sequence:
3 - one
4 - two
5 mapping:
6 ? sky
7 : blue
8 ? sea : green
+0
-4
test/YAMLParser/spec-05-04.data less more
None # RUN: yaml-bench -canonical %s
1
2 sequence: [ one, two, ]
3 mapping: { sky: blue, sea: green }
0 # RUN: yaml-bench -canonical %s
1
2 sequence: [ one, two, ]
3 mapping: { sky: blue, sea: green }
+0
-3
test/YAMLParser/spec-05-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Comment only.
0 # RUN: yaml-bench -canonical %s
1
2 # Comment only.
+0
-4
test/YAMLParser/spec-05-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 anchored: !local &anchor value
3 alias: *anchor
0 # RUN: yaml-bench -canonical %s
1
2 anchored: !local &anchor value
3 alias: *anchor
+0
-6
test/YAMLParser/spec-05-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 literal: |
3 text
4 folded: >
5 text
0 # RUN: yaml-bench -canonical %s
1
2 literal: |
3 text
4 folded: >
5 text
+0
-4
test/YAMLParser/spec-05-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 single: 'text'
3 double: "text"
0 # RUN: yaml-bench -canonical %s
1
2 single: 'text'
3 double: "text"
+0
-4
test/YAMLParser/spec-05-09.data less more
None # RUN: yaml-bench -canonical %s
1
2 %YAML 1.1
3 --- text
0 # RUN: yaml-bench -canonical %s
1
2 %YAML 1.1
3 --- text
+0
-6
test/YAMLParser/spec-05-10.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 commercial-at: @text
3 grave-accent: `text
4
5 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 commercial-at: @text
3 grave-accent: `text
4
5 # CHECK: error
+0
-5
test/YAMLParser/spec-05-11.data less more
None # RUN: yaml-bench -canonical %s
1
2 |
3 Generic line break (no glyph)
4 Generic line break (glyphed)… Line separator
 Paragraph separator

0 # RUN: yaml-bench -canonical %s
1
2 |
3 Generic line break (no glyph)
4 Generic line break (glyphed)… Line separator
 Paragraph separator

+0
-16
test/YAMLParser/spec-05-12.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently reject tabs as indentation.
3 # XFAIL: *
4
5 # Tabs do's and don'ts:
6 # comment:
7 quoted: "Quoted "
8 block: |
9 void main() {
10 printf("Hello, world!\n");
11 }
12 elsewhere: # separation
13 indentation, in plain scalar
14
15 # CHECK: error
0 # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # FIXME: This test should actually fail. Yaml-bench should report an error
3 # that a tab is being used to indent a plain scalar at line 15.
4 # We don't currently reject tabs as indentation.
5
6 # Tabs do's and don'ts:
7 # comment:
8 quoted: "Quoted "
9 block: |
10 void main() {
11 printf("Hello, world!\n");
12 }
13 elsewhere: # separation
14 indentation, in plain scalar
15
16
17 # CHECK: !!str "Quoted\t\t"
+0
-5
test/YAMLParser/spec-05-13.data less more
None # RUN: yaml-bench -canonical %s
1
2 "Text containing
3 both space and
4 tab characters"
0 # RUN: yaml-bench -canonical %s
1
2 "Text containing
3 both space and
4 tab characters"
+0
-9
test/YAMLParser/spec-05-14.data less more
None # RUN: yaml-bench -canonical %s
1
2 "Fun with \\
3 \" \a \b \e \f \
4 \n \r \t \v \0 \
5 \ \_ \N \L \P \
6 \x41 \u0041 \U00000041"
7
8 # CHECK: !!str "Fun with \\\n\" \a \b \e \f \n \r \t \v \0 \_ \N \L \P A A A"
0 # RUN: yaml-bench -canonical %s
1
2 "Fun with \\
3 \" \a \b \e \f \
4 \n \r \t \v \0 \
5 \ \_ \N \L \P \
6 \x41 \u0041 \U00000041"
7
8 # CHECK: !!str "Fun with \\\n\" \a \b \e \f \n \r \t \v \0 \_ \N \L \P A A A"
+0
-7
test/YAMLParser/spec-05-15.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 Bad escapes:
3 "\c
4 \xq-"
5
6 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 Bad escapes:
3 "\c
4 \xq-"
5
6 # CHECK: error
+0
-16
test/YAMLParser/spec-06-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Leading comment line spaces are
3 # neither content nor indentation.
4
5 Not indented:
6 By one space: |
7 By four
8 spaces
9 Flow style: [ # Leading spaces
10 By two, # in flow style
11 Also by two, # are neither
12 # Tabs are not allowed:
13 # Still by two # content nor
14 Still by two # content nor
15 ] # indentation.
0 # RUN: yaml-bench -canonical %s
1
2 # Leading comment line spaces are
3 # neither content nor indentation.
4
5 Not indented:
6 By one space: |
7 By four
8 spaces
9 Flow style: [ # Leading spaces
10 By two, # in flow style
11 Also by two, # are neither
12 # Tabs are not allowed:
13 # Still by two # content nor
14 Still by two # content nor
15 ] # indentation.
+0
-5
test/YAMLParser/spec-06-02.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Comment
3
4
0 # RUN: yaml-bench -canonical %s
1
2 # Comment
3
4
+0
-4
test/YAMLParser/spec-06-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 key: # Comment
3 value
0 # RUN: yaml-bench -canonical %s
1
2 key: # Comment
3 value
+0
-6
test/YAMLParser/spec-06-04.data less more
None # RUN: yaml-bench -canonical %s
1
2 key: # Comment
3 # lines
4 value
5
0 # RUN: yaml-bench -canonical %s
1
2 key: # Comment
3 # lines
4 value
5
+0
-8
test/YAMLParser/spec-06-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 { first: Sammy, last: Sosa }:
3 # Statistics:
4 hr: # Home runs
5 65
6 avg: # Average
7 0.278
0 # RUN: yaml-bench -canonical %s
1
2 { first: Sammy, last: Sosa }:
3 # Statistics:
4 hr: # Home runs
5 65
6 avg: # Average
7 0.278
+0
-9
test/YAMLParser/spec-06-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 plain: text
3 lines
4 quoted: "text
5 lines"
6 block: |
7 text
8 lines
0 # RUN: yaml-bench -canonical %s
1
2 plain: text
3 lines
4 quoted: "text
5 lines"
6 block: |
7 text
8 lines
+0
-10
test/YAMLParser/spec-06-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 - foo
3
4 bar
5 - |-
6 foo
7
8 bar
9
0 # RUN: yaml-bench -canonical %s
1
2 - foo
3
4 bar
5 - |-
6 foo
7
8 bar
9
+0
-4
test/YAMLParser/spec-06-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 >-
3 specific
 trimmed… … …… as… space
0 # RUN: yaml-bench -canonical %s
1
2 >-
3 specific
 trimmed… … …… as… space
+0
-5
test/YAMLParser/spec-07-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 %FOO bar baz # Should be ignored
3 # with a warning.
4 --- "foo"
0 # RUN: yaml-bench -canonical %s
1
2 %FOO bar baz # Should be ignored
3 # with a warning.
4 --- "foo"
+0
-6
test/YAMLParser/spec-07-02.data less more
None # RUN: yaml-bench -canonical %s
1
2 %YAML 1.2 # Attempt parsing
3 # with a warning
4 ---
5 "foo"
0 # RUN: yaml-bench -canonical %s
1
2 %YAML 1.2 # Attempt parsing
3 # with a warning
4 ---
5 "foo"
+0
-7
test/YAMLParser/spec-07-03.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 %YAML 1.1
3 %YAML 1.1
4 foo
5
6 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 %YAML 1.1
3 %YAML 1.1
4 foo
5
6 # CHECK: error
+0
-7
test/YAMLParser/spec-07-04.data less more
None # RUN: yaml-bench -canonical %s | FileCheck %s
1
2 %TAG !yaml! tag:yaml.org,2002:
3 ---
4 !yaml!str "foo"
5
6 #CHECK: !!str "foo"
0 # RUN: yaml-bench -canonical %s | FileCheck %s
1
2 %TAG !yaml! tag:yaml.org,2002:
3 ---
4 !yaml!str "foo"
5
6 #CHECK: !!str "foo"
+0
-10
test/YAMLParser/spec-07-05.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently parse TAG directives.
3 # XFAIL: *
4
5 %TAG ! !foo
6 %TAG ! !foo
7 bar
8
9 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently parse TAG directives.
3 # CHECK: error: Unexpected token
4
5 %TAG ! !foo
6 %TAG ! !foo
7 bar
+0
-7
test/YAMLParser/spec-07-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 %TAG ! !foo
3 %TAG !yaml! tag:yaml.org,2002:
4 ---
5 - !bar "baz"
6 - !yaml!str "string"
0 # RUN: yaml-bench -canonical %s
1
2 %TAG ! !foo
3 %TAG !yaml! tag:yaml.org,2002:
4 ---
5 - !bar "baz"
6 - !yaml!str "string"
+0
-4
test/YAMLParser/spec-07-07a.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Private application:
3 !foo "bar"
0 # RUN: yaml-bench -canonical %s
1
2 # Private application:
3 !foo "bar"
+0
-6
test/YAMLParser/spec-07-07b.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Migrated to global:
3 %TAG ! tag:ben-kiki.org,2000:app/
4 ---
5 !foo "bar"
0 # RUN: yaml-bench -canonical %s
1
2 # Migrated to global:
3 %TAG ! tag:ben-kiki.org,2000:app/
4 ---
5 !foo "bar"
+0
-11
test/YAMLParser/spec-07-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Explicitly specify default settings:
3 %TAG ! !
4 %TAG !! tag:yaml.org,2002:
5 # Named handles have no default:
6 %TAG !o! tag:ben-kiki.org,2000:
7 ---
8 - !foo "bar"
9 - !!str "string"
10 - !o!type "baz"
0 # RUN: yaml-bench -canonical %s
1
2 # Explicitly specify default settings:
3 %TAG ! !
4 %TAG !! tag:yaml.org,2002:
5 # Named handles have no default:
6 %TAG !o! tag:ben-kiki.org,2000:
7 ---
8 - !foo "bar"
9 - !!str "string"
10 - !o!type "baz"
+0
-13
test/YAMLParser/spec-07-09.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 foo
4 ...
5 # Repeated end marker.
6 ...
7 ---
8 bar
9 # No end marker.
10 ---
11 baz
12 ...
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 foo
4 ...
5 # Repeated end marker.
6 ...
7 ---
8 bar
9 # No end marker.
10 ---
11 baz
12 ...
+0
-13
test/YAMLParser/spec-07-10.data less more
None # RUN: yaml-bench -canonical %s
1
2 "Root flow
3 scalar"
4 --- !!str >
5 Root block
6 scalar
7 ---
8 # Root collection:
9 foo : bar
10 ... # Is optional.
11 ---
12 # Explicit document may be empty.
0 # RUN: yaml-bench -canonical %s
1
2 "Root flow
3 scalar"
4 --- !!str >
5 Root block
6 scalar
7 ---
8 # Root collection:
9 foo : bar
10 ... # Is optional.
11 ---
12 # Explicit document may be empty.
+0
-4
test/YAMLParser/spec-07-11.data less more
None # RUN: yaml-bench -canonical %s
1
2 # A stream may contain
3 # no documents.
0 # RUN: yaml-bench -canonical %s
1
2 # A stream may contain
3 # no documents.
+0
-5
test/YAMLParser/spec-07-12a.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Implicit document. Root
3 # collection (mapping) node.
4 foo : bar
0 # RUN: yaml-bench -canonical %s
1
2 # Implicit document. Root
3 # collection (mapping) node.
4 foo : bar
+0
-6
test/YAMLParser/spec-07-12b.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Explicit document. Root
3 # scalar (literal) node.
4 --- |
5 Text content
0 # RUN: yaml-bench -canonical %s
1
2 # Explicit document. Root
3 # scalar (literal) node.
4 --- |
5 Text content
+0
-11
test/YAMLParser/spec-07-13.data less more
None # RUN: yaml-bench -canonical %s
1
2 ! "First document"
3 ---
4 !foo "No directives"
5 %TAG ! !foo
6 ---
7 !bar "With directives"
8 %YAML 1.1
9 ---
10 !baz "Reset settings"
0 # RUN: yaml-bench -canonical %s
1
2 ! "First document"
3 ---
4 !foo "No directives"
5 %TAG ! !foo
6 ---
7 !bar "With directives"
8 %YAML 1.1
9 ---
10 !baz "Reset settings"
+0
-4
test/YAMLParser/spec-08-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 !!str &a1 "foo" : !!str bar
3 &a2 baz : *a1
0 # RUN: yaml-bench -canonical %s
1
2 !!str &a1 "foo" : !!str bar
3 &a2 baz : *a1
+0
-4
test/YAMLParser/spec-08-02.data less more
None # RUN: yaml-bench -canonical %s
1
2 First occurrence: &anchor Value
3 Second occurrence: *anchor
0 # RUN: yaml-bench -canonical %s
1
2 First occurrence: &anchor Value
3 Second occurrence: *anchor
+0
-4
test/YAMLParser/spec-08-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 ! foo :
3 ! baz
0 # RUN: yaml-bench -canonical %s
1
2 ! foo :
3 ! baz
+0
-9
test/YAMLParser/spec-08-04.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently look at the content of literal tags.
3 # XFAIL: *
4
5 - ! foo
6 - !<$:?> bar
7
8 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently look at the content of literal tags.
3 # CHECK: error: Unknown tag handle
4
5 - ! foo
6 - !<$:?> bar
+0
-7
test/YAMLParser/spec-08-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 %TAG !o! tag:ben-kiki.org,2000:
3 ---
4 - !local foo
5 - !!str bar
6 - !o!type baz
0 # RUN: yaml-bench -canonical %s
1
2 %TAG !o! tag:ben-kiki.org,2000:
3 ---
4 - !local foo
5 - !!str bar
6 - !o!type baz
+0
-12
test/YAMLParser/spec-08-06.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently validate tags.
3 # XFAIL: *
4
5 %TAG !o! tag:ben-kiki.org,2000:
6 ---
7 - !$a!b foo
8 - !o! bar
9 - !h!type baz
10
11 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # We don't currently validate tags.
3 # CHECK: error: Unknown tag handle
4
5 %TAG !o! tag:ben-kiki.org,2000:
6 ---
7 - !$a!b foo
8 - !o! bar
9 - !h!type baz
10
+0
-6
test/YAMLParser/spec-08-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Assuming conventional resolution:
3 - "12"
4 - 12
5 - ! 12
0 # RUN: yaml-bench -canonical %s
1
2 # Assuming conventional resolution:
3 - "12"
4 - 12
5 - ! 12
+0
-15
test/YAMLParser/spec-08-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 foo:
4 "bar
5 baz"
6 ---
7 "foo
8 bar"
9 ---
10 foo
11 bar
12 --- |
13 foo
14 ...
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 foo:
4 "bar
5 baz"
6 ---
7 "foo
8 bar"
9 ---
10 foo
11 bar
12 --- |
13 foo
14 ...
+0
-13
test/YAMLParser/spec-08-09.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 scalars:
4 plain: !!str some text
5 quoted:
6 single: 'some text'
7 double: "some text"
8 collections:
9 sequence: !!seq [ !!str entry,
10 # Mapping entry:
11 key: value ]
12 mapping: { key: value }
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 scalars:
4 plain: !!str some text
5 quoted:
6 single: 'some text'
7 double: "some text"
8 collections:
9 sequence: !!seq [ !!str entry,
10 # Mapping entry:
11 key: value ]
12 mapping: { key: value }
+0
-17
test/YAMLParser/spec-08-10.data less more
None # RUN: yaml-bench -canonical %s
1
2 block styles:
3 scalars:
4 literal: !!str |
5 #!/usr/bin/perl
6 print "Hello, world!\n";
7 folded: >
8 This sentence
9 is false.
10 collections: !!map
11 sequence: !!seq # Entry:
12 - entry # Plain
13 # Mapping entry:
14 - key: value
15 mapping:
16 key: value
0 # RUN: yaml-bench -canonical %s
1
2 block styles:
3 scalars:
4 literal: !!str |
5 #!/usr/bin/perl
6 print "Hello, world!\n";
7 folded: >
8 This sentence
9 is false.
10 collections: !!map
11 sequence: !!seq # Entry:
12 - entry # Plain
13 # Mapping entry:
14 - key: value
15 mapping:
16 key: value
+0
-4
test/YAMLParser/spec-08-11.data less more
None # RUN: yaml-bench -canonical %s
1
2 First occurrence: &anchor Value
3 Second occurrence: *anchor
0 # RUN: yaml-bench -canonical %s
1
2 First occurrence: &anchor Value
3 Second occurrence: *anchor
+0
-10
test/YAMLParser/spec-08-12.data less more
None # RUN: yaml-bench -canonical %s
1
2 [
3 Without properties,
4 &anchor "Anchored",
5 !!str 'Tagged',
6 *anchor, # Alias node
7 !!str , # Empty plain scalar
8 '', # Empty plain scalar
9 ]
0 # RUN: yaml-bench -canonical %s
1
2 [
3 Without properties,
4 &anchor "Anchored",
5 !!str 'Tagged',
6 *anchor, # Alias node
7 !!str , # Empty plain scalar
8 '', # Empty plain scalar
9 ]
+0
-6
test/YAMLParser/spec-08-13.data less more
None # RUN: yaml-bench -canonical %s
1
2 {
3 ? foo :,
4 ? : bar,
5 }
0 # RUN: yaml-bench -canonical %s
1
2 {
3 ? foo :,
4 ? : bar,
5 }
+0
-7
test/YAMLParser/spec-08-14.data less more
None # RUN: yaml-bench -canonical %s
1
2 - "flow in block"
3 - >
4 Block scalar
5 - !!map # Block collection
6 foo : bar
0 # RUN: yaml-bench -canonical %s
1
2 - "flow in block"
3 - >
4 Block scalar
5 - !!map # Block collection
6 foo : bar
+0
-7
test/YAMLParser/spec-08-15.data less more
None # RUN: yaml-bench -canonical %s
1
2 - # Empty plain scalar
3 - ? foo
4 :
5 ?
6 : bar
0 # RUN: yaml-bench -canonical %s
1
2 - # Empty plain scalar
3 - ? foo
4 :
5 ?
6 : bar
+0
-8
test/YAMLParser/spec-09-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 "simple key" : {
3 "also simple" : value,
4 ? "not a
5 simple key" : "any
6 value"
7 }
0 # RUN: yaml-bench -canonical %s
1
2 "simple key" : {
3 "also simple" : value,
4 ? "not a
5 simple key" : "any
6 value"
7 }
+0
-14
test/YAMLParser/spec-09-02.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # Indent trimming is not yet implemented.
3 # XFAIL: *
4
5 "as space
6 trimmed
7
8 specific
9
10 escaped \
11 none"
12
13 # CHECK: !!str "as space trimmed\nspecific\nescaped\tnone"
0 # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 "as space
3 trimmed
4
5 specific
6
7 escaped \
8 none"
9
10 # FIXME: The string below should actually be
11 # "as space trimmed\nspecific\nescaped\tnone", but the parser currently has
12 # a bug when parsing multiline quoted strings.
13 # CHECK: !!str "as space\n trimmed\n specific\n escaped\t none"
+0
-8
test/YAMLParser/spec-09-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 - "
3 last"
4 - "
5 last"
6 - " first
7 last"
0 # RUN: yaml-bench -canonical %s
1
2 - "
3 last"
4 - "
5 last"
6 - " first
7 last"
+0
-6
test/YAMLParser/spec-09-04.data less more
None # RUN: yaml-bench -canonical %s
1
2 "first
3 inner 1
4 \ inner 2 \
5 last"
0 # RUN: yaml-bench -canonical %s
1
2 "first
3 inner 1
4 \ inner 2 \
5 last"
+0
-10
test/YAMLParser/spec-09-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 - "first
3 "
4 - "first
5
6 last"
7 - "first
8 inner
9 \ last"
0 # RUN: yaml-bench -canonical %s
1
2 - "first
3 "
4 - "first
5
6 last"
7 - "first
8 inner
9 \ last"
+0
-3
test/YAMLParser/spec-09-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 'here''s to "quotes"'
0 # RUN: yaml-bench -canonical %s
1
2 'here''s to "quotes"'
+0
-8
test/YAMLParser/spec-09-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 'simple key' : {
3 'also simple' : value,
4 ? 'not a
5 simple key' : 'any
6 value'
7 }
0 # RUN: yaml-bench -canonical %s
1
2 'simple key' : {
3 'also simple' : value,
4 ? 'not a
5 simple key' : 'any
6 value'
7 }
+0
-3
test/YAMLParser/spec-09-08.data less more
None # RUN: yaml-bench -canonical %s
1
2 'as space … trimmed …… specific
… none'
0 # RUN: yaml-bench -canonical %s
1
2 'as space … trimmed …… specific
… none'
+0
-8
test/YAMLParser/spec-09-09.data less more
None # RUN: yaml-bench -canonical %s
1
2 - '
3 last'
4 - '
5 last'
6 - ' first
7 last'
0 # RUN: yaml-bench -canonical %s
1
2 - '
3 last'
4 - '
5 last'
6 - ' first
7 last'
+0
-5
test/YAMLParser/spec-09-10.data less more
None # RUN: yaml-bench -canonical %s
1
2 'first
3 inner
4 last'
0 # RUN: yaml-bench -canonical %s
1
2 'first
3 inner
4 last'
+0
-7
test/YAMLParser/spec-09-11.data less more
None # RUN: yaml-bench -canonical %s
1
2 - 'first
3 '
4 - 'first
5
6 last'
0 # RUN: yaml-bench -canonical %s
1
2 - 'first
3 '
4 - 'first
5
6 last'
+0
-10
test/YAMLParser/spec-09-12.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Outside flow collection:
3 - ::std::vector
4 - Up, up, and away!
5 - -123
6 # Inside flow collection:
7 - [ '::std::vector',
8 "Up, up, and away!",
9 -123 ]
0 # RUN: yaml-bench -canonical %s
1
2 # Outside flow collection:
3 - ::std::vector
4 - Up, up, and away!
5 - -123
6 # Inside flow collection:
7 - [ '::std::vector',
8 "Up, up, and away!",
9 -123 ]
+0
-8
test/YAMLParser/spec-09-13.data less more
None # RUN: yaml-bench -canonical %s
1
2 simple key : {
3 also simple : value,
4 ? not a
5 simple key : any
6 value
7 }
0 # RUN: yaml-bench -canonical %s
1
2 simple key : {
3 also simple : value,
4 ? not a
5 simple key : any
6 value
7 }
+0
-21
test/YAMLParser/spec-09-14.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # Not quite sure why this doesn't fail.
3 # XFAIL: *
4
5 ---
6 --- ||| : foo
7 ... >>>: bar
8 ---
9 [
10 ---
11 ,
12 ... ,
13 {
14 --- :
15 ... # Nested
16 }
17 ]
18 ...
19
20 # CHECK: error
0 # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # FIXME: This test should actually fail. Yaml bench should report an error that
3 # says that the '---' and '...' document start/end markers must not be specified
4 # as the first content line of a non-indented plain scalar.
5 # CHECK: !!str
6
7 ---
8 --- ||| : foo
9 ... >>>: bar
10 ---
11 [
12 ---
13 ,
14 ... ,
15 {
16 --- :
17 ... # Nested
18 }
19 ]
20 ...
+0
-15
test/YAMLParser/spec-09-15.data less more
None # RUN: yaml-bench -canonical %s
1
2 ---
3 "---" : foo
4 ...: bar
5 ---
6 [
7 ---,
8 ...,
9 {
10 ? ---
11 : ...
12 }
13 ]
14 ...
0 # RUN: yaml-bench -canonical %s
1
2 ---
3 "---" : foo
4 ...: bar
5 ---
6 [
7 ---,
8 ...,
9 {
10 ? ---
11 : ...
12 }
13 ]
14 ...
+0
-5
test/YAMLParser/spec-09-16.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Tabs are confusing:
3 # as space/trimmed/specific/none
4 as space … trimmed …… specific
… none
0 # RUN: yaml-bench -canonical %s
1
2 # Tabs are confusing:
3 # as space/trimmed/specific/none
4 as space … trimmed …… specific
… none
+0
-5
test/YAMLParser/spec-09-17.data less more
None # RUN: yaml-bench -canonical %s
1
2 first line
3
4 more line
0 # RUN: yaml-bench -canonical %s
1
2 first line
3
4 more line
+0
-11
test/YAMLParser/spec-09-18.data less more
None # RUN: yaml-bench -canonical %s
1
2 - | # Just the style
3 literal
4 - >1 # Indentation indicator
5 folded
6 - |+ # Chomping indicator
7 keep
8
9 - >-1 # Both indicators
10 strip
0 # RUN: yaml-bench -canonical %s
1
2 - | # Just the style
3 literal
4 - >1 # Indentation indicator
5 folded
6 - |+ # Chomping indicator
7 keep
8
9 - >-1 # Both indicators
10 strip
+0
-6
test/YAMLParser/spec-09-19.data less more
None # RUN: yaml-bench -canonical %s
1
2 - |
3 literal
4 - >
5 folded
0 # RUN: yaml-bench -canonical %s
1
2 - |
3 literal
4 - >
5 folded
+0
-13
test/YAMLParser/spec-09-20.data less more
None # RUN: yaml-bench -canonical %s
1
2 - |
3 detected
4 - >
5
6
7 # detected
8 - |1
9 explicit
10 - >
11
12 detected
0 # RUN: yaml-bench -canonical %s
1
2 - |
3 detected
4 - >
5
6
7 # detected
8 - |1
9 explicit
10 - >
11
12 detected
+0
-12
test/YAMLParser/spec-09-21.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 - |
3
4 text
5 - >
6 text
7 text
8 - |1
9 text
10
11 # CHECK: error
0 # RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
1
2 - |
3
4 text
5 - >
6 text
7 text
8 - |1
9 text
10
11 # CHECK: error
+0
-6
test/YAMLParser/spec-09-22.data less more
None # RUN: yaml-bench -canonical %s
1
2 strip: |-
3 text
clip: |
4 text…keep: |+
5 text

0 # RUN: yaml-bench -canonical %s
1
2 strip: |-
3 text
clip: |
4 text…keep: |+
5 text

+0
-13
test/YAMLParser/spec-09-23.data less more
None # RUN: yaml-bench -canonical %s
1
2 # Strip
3 # Comments:
4 strip: |-
5 # text
 
 # Clip
6 # comments:
7 …clip: |
8 # text… 
 # Keep
9 # comments:
10 …keep: |+
11 # text
… # Trail
12 # comments.
0 # RUN: yaml-bench -canonical %s
1
2 # Strip
3 # Comments:
4 strip: |-
5 # text
 
 # Clip
6 # comments:
7 …clip: |
8 # text… 
 # Keep
9 # comments:
10 …keep: |+
11 # text
… # Trail
12 # comments.
+0
-8
test/YAMLParser/spec-09-24.data less more
None # RUN: yaml-bench -canonical %s
1
2 strip: >-
3
4 clip: >
5
6 keep: |+
7
0 # RUN: yaml-bench -canonical %s
1
2 strip: >-
3
4 clip: >
5
6 keep: |+
7
+0
-5
test/YAMLParser/spec-09-25.data less more
None # RUN: yaml-bench -canonical %s
1
2 | # Simple block scalar
3 literal
4 text
0 # RUN: yaml-bench -canonical %s
1
2 | # Simple block scalar
3 literal
4 text
+0
-10
test/YAMLParser/spec-09-26.data less more
None # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
+0
-10
test/YAMLParser/spec-09-27.data less more
None # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
+0
-10
test/YAMLParser/spec-09-28.data less more
None # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 |
3
4
5 literal
6
7 text
8
9 # Comment
+0
-6
test/YAMLParser/spec-09-29.data less more
None # RUN: yaml-bench -canonical %s
1
2 > # Simple folded scalar
3 folded
4 text
5 lines
0 # RUN: yaml-bench -canonical %s
1
2 > # Simple folded scalar
3 folded
4 text
5 lines
+0
-16
test/YAMLParser/spec-09-30.data less more
None # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
+0
-16
test/YAMLParser/spec-09-31.data less more
None # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
+0
-16
test/YAMLParser/spec-09-32.data less more
None # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
+0
-16
test/YAMLParser/spec-09-33.data less more
None # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
0 # RUN: yaml-bench -canonical %s
1
2 >
3 folded
4 line
5
6 next
7 line
8
9 * bullet
10 * list
11
12 last
13 line
14
15 # Comment
+0
-4
test/YAMLParser/spec-10-01.data less more
None # RUN: yaml-bench -canonical %s
1
2 - [ inner, inner, ]
3 - [inner,last]
0 # RUN: yaml-bench -canonical %s
1
2 - [ inner, inner, ]
3 - [inner,last]
+0
-10
test/YAMLParser/spec-10-02.data less more
None # RUN: yaml-bench -canonical %s
1
2 [
3 "double
4 quoted", 'single
5 quoted',
6 plain
7 text, [ nested ],
8 single: pair ,
9 ]
0 # RUN: yaml-bench -canonical %s
1
2 [
3 "double
4 quoted", 'single
5 quoted',
6 plain
7 text, [ nested ],
8 single: pair ,
9 ]
+0
-6
test/YAMLParser/spec-10-03.data less more
None # RUN: yaml-bench -canonical %s
1
2 block: # Block
3 # sequence
4 - one
5 - two : three
0 # RUN: yaml-bench -canonical %s
1
2 block: # Block
3 # sequence
4 - one
5 - two : three
+0
-6
test/YAMLParser/spec-10-04.data less more
None # RUN: yaml-bench -canonical %s
1
2 block:
3 - one
4 -
5 - two
0 # RUN: yaml-bench -canonical %s
1
2 block:
3 - one
4 -
5 - two
+0
-9
test/YAMLParser/spec-10-05.data less more
None # RUN: yaml-bench -canonical %s
1
2 - # Empty
3 - |
4 block node
5 - - one # in-line
6 - two # sequence
7 - one: two # in-line
8 # mapping
0 # RUN: yaml-bench -canonical %s
1
2 - # Empty
3 - |
4 block node
5 - - one # in-line
6 - two # sequence
7 - one: two # in-line
8 # mapping
+0
-4
test/YAMLParser/spec-10-06.data less more
None # RUN: yaml-bench -canonical %s
1
2 - { inner : entry , also: inner , }
3 - {inner: entry,last : entry}
0 # RUN: yaml-bench -canonical %s
1
2 - { inner : entry , also: inner , }
3 - {inner: entry,last : entry}
+0
-9
test/YAMLParser/spec-10-07.data less more
None # RUN: yaml-bench -canonical %s
1
2 {
3 ? : value, # Empty key
4 ? explicit
5 key: value,
6 simple key : value,
7 [ collection, simple, key ]: value
8 }
0 # RUN: yaml-bench -canonical %s
1
2 {
3 ? : value, # Empty key
4 ? explicit
5 key: value,
6 simple key : value,
7 [ collection, simple, key ]: value
8 }
+0
-13
test/YAMLParser/spec-10-08.data less more
None # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # This fails because even without a key token, some contexts (in this case flow
3 # maps) allow implicit null keys, which mix with this in weird ways.
4 # XFAIL: *
5
6 {
7 multi-line
8 simple key : value,
9 very long ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................(>1KB)................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... key: value
10 }
11
12 # CHECK: error
0 # RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
1 #
2 # FIXME: This test should fail. Yaml bench should report an error that a simple
3 # key spa