aboutsummaryrefslogtreecommitdiffstats
path: root/tests/json/t-json.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-08-07tests,json: Remove no longer needed codeIngo Klöcker1-106/+1
* tests/json/t-json.c (parse_version_number, parse_version_string, compare_versions, check_gpg_version): Remove. (main): Use have_gpg_version from t-support.h. -- In the meantime gpgrt provides API for comparing versions (which is used by have_gpg_version in t-support.h).
2024-05-21json: Add information about revocation keys to key list resultIngo Klöcker1-0/+1
* src/gpgme-json.c (revocation_key_to_json): New. (key_to_json): Add list of revocation keys. * tests/json/Makefile.am (pubring-stamp): Import new pub key. * tests/json/key-with-revokers.asc: New. * tests/json/t-json.c (tests): Add "t-keylist-revokers". * tests/json/t-keylist-revokers.in.json, tests/json/t-keylist-revokers.in.json: New. -- GnuPG-bug-id: 7118
2024-05-21tests: Fix segv in t-json.cWerner Koch1-1/+1
* tests/json/t-json.c (test_contains): Avoid calling recusivly with no child.
2023-10-13doc: Fix typos in documentation and source code commentsIngo Klöcker1-1/+1
-- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
2020-10-03tests: Fix gcc incompatibilityWerner Koch1-5/+13
* tests/json/t-json.c: Remove var definitions inside a for statement. -- This useful C99 feature seems to work only in recent gcc versions. We can't use it; see gnupg/doc/HACKING. GnuPG-bug-id: 5088
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 Koch1-19/+19
-- Signed-off-by: Werner Koch <[email protected]>
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 Heinecke1-1/+1
* 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: Add missing files and chunking testAndre Heinecke1-1/+1
* 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 Heinecke1-1/+9
* 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 Heinecke1-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 Heinecke1-0/+344
* 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.