diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/frameworks/24 libgcrypt/libgcrypt_prog.c | 8 | ||||
-rw-r--r-- | test cases/frameworks/24 libgcrypt/meson.build | 23 | ||||
-rw-r--r-- | test cases/frameworks/24 libgcrypt/test.json | 3 |
3 files changed, 34 insertions, 0 deletions
diff --git a/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c b/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c new file mode 100644 index 0000000..f131359 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c @@ -0,0 +1,8 @@ +#include <gcrypt.h> + +int +main() +{ + gcry_check_version(NULL); + return 0; +} diff --git a/test cases/frameworks/24 libgcrypt/meson.build b/test cases/frameworks/24 libgcrypt/meson.build new file mode 100644 index 0000000..5aadb13 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/meson.build @@ -0,0 +1,23 @@ +project('libgcrypt test', 'c') + +wm = find_program('libgcrypt-config', required : false) +if not wm.found() + error('MESON_SKIP_TEST: libgcrypt-config not installed') +endif + +libgcrypt_dep = dependency('libgcrypt', version : '>= 1.0') +libgcrypt_ver = libgcrypt_dep.version() +assert(libgcrypt_ver.split('.').length() > 1, 'libgcrypt version is "@0@"'.format(libgcrypt_ver)) +message('libgcrypt version is "@0@"'.format(libgcrypt_ver)) +e = executable('libgcrypt_prog', 'libgcrypt_prog.c', dependencies : libgcrypt_dep) + +test('libgcrypttest', e) + +# Test using the method keyword: + +dependency('libgcrypt', method : 'config-tool') +dependency('libgcrypt', method : 'pkg-config', required: false) + +# Check we can apply a version constraint +dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'pkg-config', required: false) +dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'config-tool') diff --git a/test cases/frameworks/24 libgcrypt/test.json b/test cases/frameworks/24 libgcrypt/test.json new file mode 100644 index 0000000..77b68c0 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "msys2"] +} |