aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/40 options/meson.build
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/40 options/meson.build
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/40 options/meson.build')
-rw-r--r--meson/test cases/common/40 options/meson.build45
1 files changed, 45 insertions, 0 deletions
diff --git a/meson/test cases/common/40 options/meson.build b/meson/test cases/common/40 options/meson.build
new file mode 100644
index 000000000..2eccef7b0
--- /dev/null
+++ b/meson/test cases/common/40 options/meson.build
@@ -0,0 +1,45 @@
+project('options', 'c')
+
+if get_option('testoption') != 'optval'
+ error('Incorrect value to test option')
+endif
+
+if get_option('other_one') != false
+ error('Incorrect value to boolean option.')
+endif
+
+if get_option('combo_opt') != 'combo'
+ error('Incorrect value to combo option.')
+endif
+
+if get_option('array_opt') != ['one', 'two']
+ message(get_option('array_opt'))
+ error('Incorrect value for array option')
+endif
+
+# If the default changes, update test cases/unit/13 reconfigure
+if get_option('b_lto') != false
+ error('Incorrect value in base option.')
+endif
+
+if get_option('includedir') != 'include'
+ error('Incorrect value in builtin option.')
+endif
+
+if get_option('integer_opt') != 3
+ error('Incorrect value in integer option.')
+endif
+
+if get_option('neg_int_opt') != -3
+ error('Incorrect value in negative integer option.')
+endif
+
+if get_option('CaseSenSiTivE') != 'Some CAPS'
+ error('Incorrect value in mixed caps option.')
+endif
+
+if get_option('CASESENSITIVE') != 'ALL CAPS'
+ error('Incorrect value in all caps option.')
+endif
+
+assert(get_option('wrap_mode') == 'default', 'Wrap mode option is broken.')