diff options
author | bapt <bapt@FreeBSD.org> | 2014-02-23 22:27:14 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-02-23 22:27:14 +0000 |
commit | cbb652279528954a6a69a4cfcf4a2c21c4a3dfa8 (patch) | |
tree | ed0be775ebd10e97607f3794ce2f108560ef8f87 /contrib/libyaml/tests/run-parser.c | |
parent | 2fbd448d897a4f7cef0215726b8d7c203f9460cc (diff) | |
download | FreeBSD-src-cbb652279528954a6a69a4cfcf4a2c21c4a3dfa8.zip FreeBSD-src-cbb652279528954a6a69a4cfcf4a2c21c4a3dfa8.tar.gz |
Remove libyaml, it has been replaced by libucl
Diffstat (limited to 'contrib/libyaml/tests/run-parser.c')
-rw-r--r-- | contrib/libyaml/tests/run-parser.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/contrib/libyaml/tests/run-parser.c b/contrib/libyaml/tests/run-parser.c deleted file mode 100644 index 1303112..0000000 --- a/contrib/libyaml/tests/run-parser.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <yaml.h> - -#include <stdlib.h> -#include <stdio.h> - -#ifdef NDEBUG -#undef NDEBUG -#endif -#include <assert.h> - -int -main(int argc, char *argv[]) -{ - int number; - - if (argc < 2) { - printf("Usage: %s file1.yaml ...\n", argv[0]); - return 0; - } - - for (number = 1; number < argc; number ++) - { - FILE *file; - yaml_parser_t parser; - yaml_event_t event; - int done = 0; - int count = 0; - int error = 0; - - printf("[%d] Parsing '%s': ", number, argv[number]); - fflush(stdout); - - file = fopen(argv[number], "rb"); - assert(file); - - assert(yaml_parser_initialize(&parser)); - - yaml_parser_set_input_file(&parser, file); - - while (!done) - { - if (!yaml_parser_parse(&parser, &event)) { - error = 1; - break; - } - - done = (event.type == YAML_STREAM_END_EVENT); - - yaml_event_delete(&event); - - count ++; - } - - yaml_parser_delete(&parser); - - assert(!fclose(file)); - - printf("%s (%d events)\n", (error ? "FAILURE" : "SUCCESS"), count); - } - - return 0; -} - |