summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-01-04 14:21:39 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2018-01-06 19:20:32 +0200
commitfd66692f73efb80783172b9d346ae4a5b6b6fa6d (patch)
tree9c60282227f18eab18e48b453b34a5b875dc080c /test cases
parent86feb843f4c196b366ec317c5212d404df34191e (diff)
downloadmeson-fd66692f73efb80783172b9d346ae4a5b6b6fa6d.tar.gz
Fix a problem when anyone actually tries to use a non-found dependency
Fix BuildTarget.add_deps() to handle class Dependency Extend test case to cover uses of the not-found dependency object
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/171 not-found dependency/meson.build5
-rw-r--r--test cases/common/171 not-found dependency/sub/meson.build1
-rw-r--r--test cases/common/171 not-found dependency/testlib.c0
3 files changed, 5 insertions, 1 deletions
diff --git a/test cases/common/171 not-found dependency/meson.build b/test cases/common/171 not-found dependency/meson.build
index 7d92f5ae6..85505eec1 100644
--- a/test cases/common/171 not-found dependency/meson.build
+++ b/test cases/common/171 not-found dependency/meson.build
@@ -1,4 +1,4 @@
-project('dep-test')
+project('dep-test', 'c')
dep = dependency('', required:false)
if dep.found()
@@ -6,3 +6,6 @@ if dep.found()
endif
assert(dep.type_name() == 'not-found', 'dependency should be of type "not-found" not ' + dep.type_name())
+
+library('testlib', 'testlib.c', dependencies: [dep])
+subdir('sub', if_found: dep)
diff --git a/test cases/common/171 not-found dependency/sub/meson.build b/test cases/common/171 not-found dependency/sub/meson.build
new file mode 100644
index 000000000..2a33cae06
--- /dev/null
+++ b/test cases/common/171 not-found dependency/sub/meson.build
@@ -0,0 +1 @@
+error('should be disabled by subdir(if_found:)')
diff --git a/test cases/common/171 not-found dependency/testlib.c b/test cases/common/171 not-found dependency/testlib.c
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test cases/common/171 not-found dependency/testlib.c