* 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.
* 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.
* 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/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/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.
* 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.