aboutsummaryrefslogtreecommitdiffstats
path: root/tests/json (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-01-16build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.NIIBE Yutaka1-2/+3
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags. * tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE. * lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise. * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise. * tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise. -- GnuPG-bug-id: 4298 Signed-off-by: NIIBE Yutaka <[email protected]>
2018-11-28tests, json: Make them run on debian stableAndre Heinecke1-2/+2
* tests/json/t-json.c (main): Relax version check a bit.
2018-11-16Add SPDX identifiers to most source filesWerner Koch2-21/+21
-- Signed-off-by: Werner Koch <[email protected]>
2018-11-15tests,json: Clean openpgp-revocs.dAndre Heinecke1-0/+1
* tests/json/clean-local: Remove revocs.d
2018-11-15tests,json: Move version check into t-jsonAndre Heinecke1-0/+106
* tests/gpg/t-support.h (check_gpg_version, compare_versions), (parse_version_string, parse_version_number): Remove version check code. * tests/json/t-json.c (check_gpg_version, compare_versions), (parse_version_string, parse_version_number): Add. -- t-support header was not a good place for this. It should go into a library e.g. gpgrt in the future. For now we can keep it close to where it is needed.
2018-11-14tests,json: Add sig-notations testAndre Heinecke4-1/+62
* tests/json/t-sig-notations.in.json, tests/json/t-sig-notations.out.json: New * tests/json/Makefile.am (EXTRA_DIST): Add files. * tests/json/t-json.c: Register it.
2018-11-14tests,json: Fix distcheckAndre Heinecke1-2/+3
* tests/json/Makefile.am (EXTRA_DIST): Add inital and final scripts. (t_json_SOURCES): Don't use cJSON.o as source.
2018-11-14tests,json: Add more testsAndre Heinecke6-0/+50
* t-config-opt.in.json, t-config-opt.out.json, t-import.in.json, t-import.out.json, t-sign.in.json, t-sign.out.json: New. -- These should actually have been in a previous commit as they are already registered.
2018-11-14tests,json: Add missing files and chunking testAndre Heinecke6-1/+125
* tests/json/Makefile.am, tests/json/final.test, tests/json/initial.test: New. * tests/json/t-chunking.in.json, tests/json/t-chunking.out.json: New test. * tests/json/t-json.c: Register new test. -- Oops..
2018-11-14tests,json: Fix match if the first child differsAndre Heinecke1-1/+13
* tests/json/t-json.c (test_contains): Try all siblings of the haystack child. -- This fixes the case where we don't match against the first child because the order might have changed or a new element was inserted at the top. Then we have to try out also all the siblings.
2018-11-14tests,json: Add the bulk of testsAndre Heinecke25-1/+443
* t-json.c (tests): Register new tests. * t-createkey.in.json, t-createkey.out.json, t-decrypt-verify.in.json, t-decrypt-verify.out.json, t-decrypt.in.json, t-decrypt.out.json, t-delete.in.json, t-delete.out.json, t-encrypt-sign.in.json, t-encrypt-sign.out.json, t-encrypt.in.json, t-encrypt.out.json, t-export-secret-info.in.json, t-export-secret-info.out.json, t-export.in.json, t-export.out.json, t-json.c, t-keylist-secret.in.json, t-keylist-secret.out.json, t-keylist.in.json, t-keylist.out.json, t-verify.in.json, t-verify.out.json, t-version.in.json, t-version.out.json: New. -- Except for help and getmore there is now a test for each command.
2018-11-14tests,json: Add wildcard string matchingAndre Heinecke1-1/+3
* tests/json/t-json.c (test_contains): When searching for "*" accept every string. -- This allows it to write tests that check for the existence of a string value but don't care about the contents. E.g. for Data.
2018-11-14tests,json: Skip tests for older GnuPG versionsAndre Heinecke1-0/+8
* tests/json/t-json.c (main): Skip if version is not at least 2.2.0 -- In the past new tests often failed when a modern GPGME was used with old GnuPG's. This should avoid the hassle for packagers without the requirement that we test against old versions.
2018-11-14tests,json: Suffix .json to test patternAndre Heinecke3-2/+2
* tests/json/t-config.in, tests/json/t-config.out: Renamed. * t-json.c (run_test): Use new naming pattern.
2018-11-14tests,json: Improve verbose mode and add verbose 2Andre Heinecke1-13/+25
* tests/json/t-json.c (main): Handle multiple verbose args. (test-contains): Improve verbose output
2018-11-14tests,json: Fix and improve t-jsonAndre Heinecke1-10/+17
* tests/json/t-json.c (run_test): Terminate argv array correctly. (run_test): Note and handle empty response.
2018-11-14tests: Add json testrunnerAndre Heinecke3-0/+367
* configure.ac: Configure makefile. * tests/Makefile.am: Run json tests if gpg tests are run. * tests/json/t-json.c: New testrunner for json tests. * tests/json/t-config.in, tests/json/t-config.out: First test. -- The idea of this test runner is that it only looks for parts in the output. This should allow it to write robust tests that check for the basics in the output but don't fail when the output is extended or slightly changed.