Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
CMakeLists.txt | H A D | 26-Jun-2025 | 528 | 28 | 23 | |
Makefile.am | H A D | 26-Jun-2025 | 425 | 10 | 8 | |
ReadMe.md | H A D | 26-Jun-2025 | 1.2 KiB | 64 | 40 | |
example-deconstructor-alt.c | H A D | 26-Jun-2025 | 33.3 KiB | 801 | 569 | |
example-deconstructor.c | H A D | 26-Jun-2025 | 44.9 KiB | 1,128 | 754 | |
example-reformatter-alt.c | H A D | 26-Jun-2025 | 6 KiB | 218 | 154 | |
example-reformatter.c | H A D | 26-Jun-2025 | 5.4 KiB | 203 | 140 | |
run-all-tests.sh | H A D | 26-Jun-2025 | 314 | 30 | 18 | |
run-dumper.c | H A D | 26-Jun-2025 | 10.5 KiB | 315 | 278 | |
run-emitter-test-suite.c | H A D | 26-Jun-2025 | 8.5 KiB | 291 | 259 | |
run-emitter.c | H A D | 26-Jun-2025 | 12.9 KiB | 328 | 280 | |
run-loader.c | H A D | 26-Jun-2025 | 1.2 KiB | 64 | 45 | |
run-parser-test-suite.c | H A D | 26-Jun-2025 | 5.7 KiB | 190 | 176 | |
run-parser.c | H A D | 26-Jun-2025 | 1.1 KiB | 64 | 45 | |
run-scanner.c | H A D | 26-Jun-2025 | 1.1 KiB | 64 | 45 | |
test-reader.c | H A D | 26-Jun-2025 | 12.1 KiB | 355 | 316 | |
test-version.c | H A D | 26-Jun-2025 | 613 | 30 | 22 |
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