Name Date Size #Lines LOC

..--

CMakeLists.txtH A D26-Jun-2025528 2823

Makefile.amH A D26-Jun-2025425 108

ReadMe.mdH A D26-Jun-20251.2 KiB6440

example-deconstructor-alt.cH A D26-Jun-202533.3 KiB801569

example-deconstructor.cH A D26-Jun-202544.9 KiB1,128754

example-reformatter-alt.cH A D26-Jun-20256 KiB218154

example-reformatter.cH A D26-Jun-20255.4 KiB203140

run-all-tests.shH A D26-Jun-2025314 3018

run-dumper.cH A D26-Jun-202510.5 KiB315278

run-emitter-test-suite.cH A D26-Jun-20258.5 KiB291259

run-emitter.cH A D26-Jun-202512.9 KiB328280

run-loader.cH A D26-Jun-20251.2 KiB6445

run-parser-test-suite.cH A D26-Jun-20255.7 KiB190176

run-parser.cH A D26-Jun-20251.1 KiB6445

run-scanner.cH A D26-Jun-20251.1 KiB6445

test-reader.cH A D26-Jun-202512.1 KiB355316

test-version.cH A D26-Jun-2025613 3022

ReadMe.md

1# Testing the Parser and Emitter
2
3There are several programs to test the parser and emitter.
4
5## Parser
6
7    echo 'foo: bar' | ./tests/run-parser-test-suite
8
9This will output the parsing events in yaml-test-suite format:
10
11    +STR
12    +DOC
13    +MAP
14    =VAL :foo
15    =VAL :bar
16    -MAP
17    -DOC
18    -STR
19
20For flow style events, you have to enable it with the `--flow` option:
21
22    echo '{ foo: bar }' | ./tests/run-parser-test-suite --flow keep
23
24    ...
25    +MAP {}
26    ...
27
28In the future, this will be the default.
29
30You can also explicitly disable this style with `--flow off`, or output
31flow style always, with `--flow on`.
32
33## Emitter
34
35run-emitter-test-suite takes yaml-test-suite event format and emits YAML.
36
37    ./tests/run-parser-test-suite ... | ./tests/run-emitter-test-suite
38
39## Options
40
41* `--directive (1.1|1.2)`
42
43  Prints a version directive before every document.
44
45* `--flow on`
46
47  Will emit the whole document in flow style.
48
49* `--flow off`
50
51  Will emit the whole document in block style.
52
53* `--flow keep`
54
55  Will emit block/flow style like in the original document.
56
57Example:
58```
59% echo 'foo: [bar, {x: y}]' |
60  ./tests/run-parser-test-suite --flow keep |
61  ./tests/run-emitter-test-suite --flow keep
62foo: [bar, {x: y}]
63```
64