summaryrefslogtreecommitdiffstats
path: root/test cases/warning/3 fallback consistency
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/warning/3 fallback consistency/meson.build7
-rw-r--r--test cases/warning/3 fallback consistency/subprojects/sub/meson.build5
-rw-r--r--test cases/warning/3 fallback consistency/test.json10
3 files changed, 22 insertions, 0 deletions
diff --git a/test cases/warning/3 fallback consistency/meson.build b/test cases/warning/3 fallback consistency/meson.build
new file mode 100644
index 0000000..ad2b226
--- /dev/null
+++ b/test cases/warning/3 fallback consistency/meson.build
@@ -0,0 +1,7 @@
+project('proj', 'c')
+
+# The first call succeed and cache the value of 'sub' dependency. The 2nd call
+# should return the cached value, but still verify the fallback variable is
+# consistent.
+dependency('sub', fallback : ['sub', 'dep1'])
+dependency('sub', fallback : ['sub', 'dep2'])
diff --git a/test cases/warning/3 fallback consistency/subprojects/sub/meson.build b/test cases/warning/3 fallback consistency/subprojects/sub/meson.build
new file mode 100644
index 0000000..12a6570
--- /dev/null
+++ b/test cases/warning/3 fallback consistency/subprojects/sub/meson.build
@@ -0,0 +1,5 @@
+project('proj', 'c')
+
+dep1 = declare_dependency()
+dep2 = declare_dependency()
+meson.override_dependency('sub', dep1)
diff --git a/test cases/warning/3 fallback consistency/test.json b/test cases/warning/3 fallback consistency/test.json
new file mode 100644
index 0000000..60e25b4
--- /dev/null
+++ b/test cases/warning/3 fallback consistency/test.json
@@ -0,0 +1,10 @@
+{
+ "stdout": [
+ {
+ "line": "WARNING: Inconsistency: Subproject has overridden the dependency with another variable than 'dep2'"
+ }
+ ],
+ "tools": {
+ "cmake": ">=3.14"
+ }
+}