diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/frameworks/27 gpgme | |
parent | Initial commit. (diff) | |
download | meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/frameworks/27 gpgme')
-rw-r--r-- | test cases/frameworks/27 gpgme/gpgme_prog.c | 8 | ||||
-rw-r--r-- | test cases/frameworks/27 gpgme/meson.build | 27 | ||||
-rw-r--r-- | test cases/frameworks/27 gpgme/test.json | 3 |
3 files changed, 38 insertions, 0 deletions
diff --git a/test cases/frameworks/27 gpgme/gpgme_prog.c b/test cases/frameworks/27 gpgme/gpgme_prog.c new file mode 100644 index 0000000..594f685 --- /dev/null +++ b/test cases/frameworks/27 gpgme/gpgme_prog.c @@ -0,0 +1,8 @@ +#include <gpgme.h> + +int +main() +{ + printf("gpgme-v%s", gpgme_check_version(NULL)); + return 0; +} diff --git a/test cases/frameworks/27 gpgme/meson.build b/test cases/frameworks/27 gpgme/meson.build new file mode 100644 index 0000000..91b1aaa --- /dev/null +++ b/test cases/frameworks/27 gpgme/meson.build @@ -0,0 +1,27 @@ +project('gpgme test', 'c') + +wm = find_program('gpgme-config', required: false) +if not wm.found() + error('MESON_SKIP_TEST: gpgme-config not installed') +endif + +gpgme_dep = dependency('gpgme', version: '>= 1.0') +gpgme_ver = gpgme_dep.version() +assert(gpgme_ver.split('.').length() > 1, 'gpgme version is "@0@"'.format(gpgme_ver)) +message('gpgme version is "@0@"'.format(gpgme_ver)) +e = executable('gpgme_prog', 'gpgme_prog.c', dependencies: gpgme_dep) + +test('gpgmetest', e) + +# Test using the method keyword: + +dependency('gpgme', method: 'config-tool') + +# Check we can apply a version constraint +dependency('gpgme', version: '>=@0@'.format(gpgme_dep.version()), method: 'config-tool') + +# If gpgme is new enough, make sure it picks up pkg-config by default: + +if gpgme_ver.version_compare('>=1.13.0') + assert(gpgme_dep.type_name() == 'pkgconfig', 'dependency found via pkg-config') +endif diff --git a/test cases/frameworks/27 gpgme/test.json b/test cases/frameworks/27 gpgme/test.json new file mode 100644 index 0000000..aa7d932 --- /dev/null +++ b/test cases/frameworks/27 gpgme/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2", "linux-arch"] +} |