diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-09-24 23:28:34 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-10-03 10:06:04 +0200 |
commit | 061deec9939b35d0e0707e07fc1e9e762f419457 (patch) | |
tree | f2acec2866bb43fd86b17851f530400504b1ff0b | |
parent | 942f145de9744b2ffce0c01e153b18a6ea471b9d (diff) | |
download | meson-061deec9939b35d0e0707e07fc1e9e762f419457.zip meson-061deec9939b35d0e0707e07fc1e9e762f419457.tar.gz meson-061deec9939b35d0e0707e07fc1e9e762f419457.tar.bz2 |
added test case for is_system dependency
-rw-r--r-- | test cases/common/226 is_system dependency/meson.build | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test cases/common/226 is_system dependency/meson.build b/test cases/common/226 is_system dependency/meson.build new file mode 100644 index 0000000..e96cd0a --- /dev/null +++ b/test cases/common/226 is_system dependency/meson.build @@ -0,0 +1,20 @@ +project( + 'dependency is_system', + ['c', 'cpp'], +) + +dep = dependency('zlib', method: 'pkg-config', required : false) +if not dep.found() + error('MESON_SKIP_TEST zlib was not found') +endif + +assert(dep.is_system() == false, 'is_system must default to false') + +dep_sys = dep.as_system() +assert(dep_sys.is_system() == true, 'as_system must default to true') + +dep2 = dependency('zlib', method: 'pkg-config', is_system : true) +assert(dep2.is_system() == true, 'is_system must be true when set') + +dep2_sys = dep2.as_system(false) +assert(dep2_sys.is_system() == false, 'as_system must set is_system correctly') |