aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-04-04 17:39:39 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2020-07-01 09:45:33 -0400
commit56c9e95b04b51def7443a514e5021fa7b70fe8c8 (patch)
tree354b79309dc4c57a58eae71eab273b06a18542e3 /test cases
parent64f36613ef5d54de9d2040da60b225c1ef11140d (diff)
downloadmeson-56c9e95b04b51def7443a514e5021fa7b70fe8c8.zip
meson-56c9e95b04b51def7443a514e5021fa7b70fe8c8.tar.gz
meson-56c9e95b04b51def7443a514e5021fa7b70fe8c8.tar.bz2
Implicit dependency fallback when a subproject wrap or dir exists
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/102 subproject subdir/meson.build4
-rw-r--r--test cases/common/102 subproject subdir/subprojects/sub_implicit/meson.build4
-rw-r--r--test cases/linuxlike/5 dependency versions/meson.build4
3 files changed, 10 insertions, 2 deletions
diff --git a/test cases/common/102 subproject subdir/meson.build b/test cases/common/102 subproject subdir/meson.build
index 8299a37..46a2bce 100644
--- a/test cases/common/102 subproject subdir/meson.build
+++ b/test cases/common/102 subproject subdir/meson.build
@@ -25,3 +25,7 @@ dependency('sub-novar', fallback : 'sub_novar')
# Verify a subproject can force a dependency to be not-found
d = dependency('sub-notfound', fallback : 'sub_novar', required : false)
assert(not d.found(), 'Dependency should be not-found')
+
+# Verify that implicit fallback works because subprojects/sub_implicit directory exists
+d = dependency('sub_implicit')
+assert(d.found(), 'Should implicitly fallback')
diff --git a/test cases/common/102 subproject subdir/subprojects/sub_implicit/meson.build b/test cases/common/102 subproject subdir/subprojects/sub_implicit/meson.build
new file mode 100644
index 0000000..613bd05
--- /dev/null
+++ b/test cases/common/102 subproject subdir/subprojects/sub_implicit/meson.build
@@ -0,0 +1,4 @@
+project('sub_implicit', 'c', version : '1.0')
+
+dep = declare_dependency()
+meson.override_dependency('sub_implicit', dep)
diff --git a/test cases/linuxlike/5 dependency versions/meson.build b/test cases/linuxlike/5 dependency versions/meson.build
index 94f424d..164e679 100644
--- a/test cases/linuxlike/5 dependency versions/meson.build
+++ b/test cases/linuxlike/5 dependency versions/meson.build
@@ -31,10 +31,10 @@ dependency('somebrokenlib', version : '>=1.0', required : false)
# Search for an external dependency that won't be found, but must later be
# found via fallbacks
-somelibnotfound = dependency('somelib', required : false)
+somelibnotfound = dependency('somelib1', required : false)
assert(somelibnotfound.found() == false, 'somelibnotfound was found?')
# Find internal dependency without version
-somelibver = dependency('somelib',
+somelibver = dependency('somelib1',
fallback : ['somelibnover', 'some_dep'])
assert(somelibver.type_name() == 'internal', 'somelibver should be of type "internal", not ' + somelibver.type_name())
# Find an internal dependency again with the same name and a specific version