summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-06-22 13:51:53 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-30 13:28:15 +0000
commit9efdcfbb8d49286e08b7bbb50afd59f7f3d93f4a (patch)
tree7ebac4dc62700da6a533ad22264fbd7edabcd508 /test cases/common
parentaf546b52ca0281a595f4395425905c68ff0d21c2 (diff)
downloadmeson-9efdcfbb8d49286e08b7bbb50afd59f7f3d93f4a.tar.gz
Fix handling of dependency('', fallback: ['subproject', 'dep'])
Also extend a test case to cover this.
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/171 not-found dependency/meson.build2
-rw-r--r--test cases/common/171 not-found dependency/subprojects/trivial/meson.build3
-rw-r--r--test cases/common/171 not-found dependency/subprojects/trivial/trivial.c3
3 files changed, 8 insertions, 0 deletions
diff --git a/test cases/common/171 not-found dependency/meson.build b/test cases/common/171 not-found dependency/meson.build
index 85505eec1..c1e3a9a99 100644
--- a/test cases/common/171 not-found dependency/meson.build
+++ b/test cases/common/171 not-found dependency/meson.build
@@ -9,3 +9,5 @@ assert(dep.type_name() == 'not-found', 'dependency should be of type "not-found"
library('testlib', 'testlib.c', dependencies: [dep])
subdir('sub', if_found: dep)
+
+subdep = dependency('', fallback: ['trivial', 'trivial_dep'])
diff --git a/test cases/common/171 not-found dependency/subprojects/trivial/meson.build b/test cases/common/171 not-found dependency/subprojects/trivial/meson.build
new file mode 100644
index 000000000..8769c7008
--- /dev/null
+++ b/test cases/common/171 not-found dependency/subprojects/trivial/meson.build
@@ -0,0 +1,3 @@
+project('trivial subproject', 'c')
+trivial_lib = static_library('trivial', 'trivial.c', install: false)
+trivial_dep = declare_dependency(link_with: trivial_lib)
diff --git a/test cases/common/171 not-found dependency/subprojects/trivial/trivial.c b/test cases/common/171 not-found dependency/subprojects/trivial/trivial.c
new file mode 100644
index 000000000..35b21e0ce
--- /dev/null
+++ b/test cases/common/171 not-found dependency/subprojects/trivial/trivial.c
@@ -0,0 +1,3 @@
+int subfunc() {
+ return 42;
+}