diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-11 17:12:49 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-04-11 18:58:26 -0400 |
commit | 03b86cdbed3cec9f60d3a683bcbde16c0a96ec1b (patch) | |
tree | 303ae82b8fb63d26843a8ca1ed3aeee1ec82f6d9 /test cases | |
parent | a54506fe46da7e5a1a4760a4e4eebda262bf585e (diff) | |
download | meson-03b86cdbed3cec9f60d3a683bcbde16c0a96ec1b.zip meson-03b86cdbed3cec9f60d3a683bcbde16c0a96ec1b.tar.gz meson-03b86cdbed3cec9f60d3a683bcbde16c0a96ec1b.tar.bz2 |
opts: Allow `-` and `not` in meson_options.txt (fixes #6948)
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/43 options/meson.build | 4 | ||||
-rw-r--r-- | test cases/common/43 options/meson_options.txt | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/test cases/common/43 options/meson.build b/test cases/common/43 options/meson.build index c6cf9c8..08c5cca 100644 --- a/test cases/common/43 options/meson.build +++ b/test cases/common/43 options/meson.build @@ -30,4 +30,8 @@ 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 + assert(get_option('wrap_mode') == 'default', 'Wrap mode option is broken.') diff --git a/test cases/common/43 options/meson_options.txt b/test cases/common/43 options/meson_options.txt index 4e1c8d8..c5986ba 100644 --- a/test cases/common/43 options/meson_options.txt +++ b/test cases/common/43 options/meson_options.txt @@ -1,6 +1,7 @@ option('testoption', type : 'string', value : 'optval', description : 'An option to do something') -option('other_one', type : 'boolean', value : false) +option('other_one', type : 'boolean', value : not (not (not (not false)))) option('combo_opt', type : 'combo', choices : ['one', 'two', 'combo'], value : 'combo') option('array_opt', type : 'array', choices : ['one', 'two', 'three'], value : ['one', 'two']) option('free_array_opt', type : 'array') -option('integer_opt', type : 'integer', min : 0, max : 5, value : 3) +option('integer_opt', type : 'integer', min : 0, max : -(-5), value : 3) +option('neg_int_opt', type : 'integer', min : -5, max : 5, value : -3) |