aboutsummaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-07-03 14:00:47 +0300
committerGitHub <noreply@github.com>2021-07-03 14:00:47 +0300
commitec5baa62c8d8c578630a0962bbeea49bedd16a24 (patch)
tree05dffb3b12b45ab500f0c3ea6e40edef4cce1db1 /test cases/common
parentf21685a83330a4bbe1e59c3641a0d24f1efe8825 (diff)
parentbc4201a7f1e93d6afb62caa8ce81bb1b0211b70c (diff)
downloadmeson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.zip
meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.gz
meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.bz2
Merge pull request #8950 from dcbaker/submit/import-required-disabled
Add required and disabled to import, modules.found method
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/67 modules/meson.build10
-rw-r--r--test cases/common/67 modules/meson_options.txt6
2 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/67 modules/meson.build b/test cases/common/67 modules/meson.build
index e9750cd..ad33ed6 100644
--- a/test cases/common/67 modules/meson.build
+++ b/test cases/common/67 modules/meson.build
@@ -2,3 +2,13 @@ project('module test', 'c')
modtest = import('modtest')
modtest.print_hello()
+assert(modtest.found())
+
+modtest = import('modtest', required : get_option('disabled'))
+assert(not modtest.found())
+
+notfound = import('not-found', required : false)
+assert(not notfound.found())
+
+disabled = import('not-found', required : false, disabler : true)
+assert(is_disabler(disabled))
diff --git a/test cases/common/67 modules/meson_options.txt b/test cases/common/67 modules/meson_options.txt
new file mode 100644
index 0000000..0671144
--- /dev/null
+++ b/test cases/common/67 modules/meson_options.txt
@@ -0,0 +1,6 @@
+option(
+ 'disabled',
+ type : 'feature',
+ value : 'disabled',
+ description : 'test disabled'
+)