From d32ca1f2a071c1425553ae908c625d2ff6805696 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 5 Dec 2019 18:14:31 +0200 Subject: [PATCH] Add libfyaml JSON mode parser Add libfyaml's JSON mode parser - no binary required; just the built-in testsuite harness of libfyaml is enough. Signed-off-by: Pantelis Antoniou --- parsers/test_libfyaml.sh | 6 ++++++ run_tests.py | 5 +++++ 2 files changed, 11 insertions(+) create mode 100755 parsers/test_libfyaml.sh diff --git a/parsers/test_libfyaml.sh b/parsers/test_libfyaml.sh new file mode 100755 index 0000000..2fb66fb --- /dev/null +++ b/parsers/test_libfyaml.sh @@ -0,0 +1,6 @@ +#!/bin/sh +fy-testsuite --streaming --json=force $1 >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + exit 1 +fi +exit 0 diff --git a/run_tests.py b/run_tests.py index 63770d5..dfae205 100755 --- a/run_tests.py +++ b/run_tests.py @@ -480,6 +480,11 @@ { "url":"https://github.com/nlohmann/json", "commands":[os.path.join(PARSERS_DIR, "test_nlohmann_json_20190718/bin/test_nlohmann_json")] + }, + "libfyaml": + { + "url":"https://github.com/pantoniou/libfyaml", + "commands":[os.path.join(PARSERS_DIR, "test_libfyaml.sh")] } }