aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-03-14 21:00:23 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-03-14 21:00:23 +0200
commita3004652eaa8eef877ccf009e7a6ec8e32ad3475 (patch)
treeecfc96892e65e2b559a5a49b2e0e838bdba43b69 /test cases
parentcefbea48169a60039c6b1ad1512d627b60ad070c (diff)
parent5482a239363c21162526b6f2787b686678ba8bd6 (diff)
downloadmeson-a3004652eaa8eef877ccf009e7a6ec8e32ad3475.zip
meson-a3004652eaa8eef877ccf009e7a6ec8e32ad3475.tar.gz
meson-a3004652eaa8eef877ccf009e7a6ec8e32ad3475.tar.bz2
Merge test framework options.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/109 testframework options/meson.build5
-rw-r--r--test cases/common/109 testframework options/meson_options.txt3
-rw-r--r--test cases/common/109 testframework options/test_args.txt4
3 files changed, 12 insertions, 0 deletions
diff --git a/test cases/common/109 testframework options/meson.build b/test cases/common/109 testframework options/meson.build
new file mode 100644
index 0000000..2773730
--- /dev/null
+++ b/test cases/common/109 testframework options/meson.build
@@ -0,0 +1,5 @@
+project('options', 'c')
+
+assert(get_option('testoption') == 'A string with spaces', 'Incorrect value for testoption option.')
+assert(get_option('other_one') == true, 'Incorrect value for other_one option.')
+assert(get_option('combo_opt') == 'one', 'Incorrect value for combo_opt option.')
diff --git a/test cases/common/109 testframework options/meson_options.txt b/test cases/common/109 testframework options/meson_options.txt
new file mode 100644
index 0000000..653dd75
--- /dev/null
+++ b/test cases/common/109 testframework options/meson_options.txt
@@ -0,0 +1,3 @@
+option('testoption', type : 'string', value : 'optval', description : 'An option to do something')
+option('other_one', type : 'boolean', value : false)
+option('combo_opt', type : 'combo', choices : ['one', 'two', 'combo'], value : 'combo')
diff --git a/test cases/common/109 testframework options/test_args.txt b/test cases/common/109 testframework options/test_args.txt
new file mode 100644
index 0000000..a667e3a
--- /dev/null
+++ b/test cases/common/109 testframework options/test_args.txt
@@ -0,0 +1,4 @@
+# This file is not read by meson itself, but by the test framework.
+# It is not possible to pass arguments to meson from a file.
+['--werror', '-D', 'testoption=A string with spaces', '-D', 'other_one=true', \
+ '-D', 'combo_opt=one']