diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-07 15:06:23 -0400 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-09-13 16:55:38 +0530 |
commit | 923b95f3d11141417f27ecbbf43b9ae849dc9e64 (patch) | |
tree | 84fbb9fdb6e9dbd686105431ab5bc6064accce0f /test cases | |
parent | 8caf40e5ae9283f2c463ab8a2ddd829e30d0bf37 (diff) | |
download | meson-923b95f3d11141417f27ecbbf43b9ae849dc9e64.zip meson-923b95f3d11141417f27ecbbf43b9ae849dc9e64.tar.gz meson-923b95f3d11141417f27ecbbf43b9ae849dc9e64.tar.bz2 |
Fix assertion raised with invalid option name
When option name contains more that one dot, it should be detected
earlier to prevent an assert to be raised.
Fixes #11904.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/40 options/meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test cases/common/40 options/meson.build b/test cases/common/40 options/meson.build index a10ff28..de4a7d5 100644 --- a/test cases/common/40 options/meson.build +++ b/test cases/common/40 options/meson.build @@ -46,3 +46,11 @@ assert(get_option('wrap_mode') == 'default', 'Wrap mode option is broken.') assert(get_option('boolean_string') == false) assert(get_option('boolean_string2') == true) assert(get_option('integer_string') == 42) + +testcase expect_error('Invalid option name \'..invalid\'') + get_option('..invalid') +endtestcase + +testcase expect_error('Invalid option name \'this.is.also.invalid\'') + get_option('this.is.also.invalid') +endtestcase |