aboutsummaryrefslogtreecommitdiffstats
path: root/tests/json/t-json.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests,json: Remove no longer needed codeIngo Klöcker2024-08-071-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).
* json: Add information about revocation keys to key list resultIngo Klöcker2024-05-211-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
* tests: Fix segv in t-json.cWerner Koch2024-05-211-1/+1
| | | | | * tests/json/t-json.c (test_contains): Avoid calling recusivly with no child.
* doc: Fix typos in documentation and source code commentsIngo Klöcker2023-10-131-1/+1
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* tests: Fix gcc incompatibilityWerner Koch2020-10-031-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
* tests, json: Make them run on debian stableAndre Heinecke2018-11-281-2/+2
| | | | * tests/json/t-json.c (main): Relax version check a bit.
* Add SPDX identifiers to most source filesWerner Koch2018-11-161-19/+19
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* tests,json: Move version check into t-jsonAndre Heinecke2018-11-151-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.
* tests,json: Add sig-notations testAndre Heinecke2018-11-141-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.
* tests,json: Add missing files and chunking testAndre Heinecke2018-11-141-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..
* tests,json: Fix match if the first child differsAndre Heinecke2018-11-141-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.
* tests,json: Add the bulk of testsAndre Heinecke2018-11-141-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.
* tests,json: Add wildcard string matchingAndre Heinecke2018-11-141-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.
* tests,json: Skip tests for older GnuPG versionsAndre Heinecke2018-11-141-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.
* tests,json: Suffix .json to test patternAndre Heinecke2018-11-141-2/+2
| | | | | * tests/json/t-config.in, tests/json/t-config.out: Renamed. * t-json.c (run_test): Use new naming pattern.
* tests,json: Improve verbose mode and add verbose 2Andre Heinecke2018-11-141-13/+25
| | | | | * tests/json/t-json.c (main): Handle multiple verbose args. (test-contains): Improve verbose output
* tests,json: Fix and improve t-jsonAndre Heinecke2018-11-141-10/+17
| | | | | * tests/json/t-json.c (run_test): Terminate argv array correctly. (run_test): Note and handle empty response.
* tests: Add json testrunnerAndre Heinecke2018-11-141-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.