this fixes eg set_variable('foo', ['bar', 'baz']), which was previously erroring out complaining about the number of arguments. Closes #14810.46
parent
b6443c52ed
commit
abb9a4e96f
5 changed files with 67 additions and 21 deletions
@ -0,0 +1,23 @@ |
||||
project('args flattening') |
||||
|
||||
arr = get_variable('does-not-exist', ['bar', 'baz']) |
||||
|
||||
assert(arr == ['bar', 'baz'], 'get_variable with array fallback is broken') |
||||
|
||||
set_variable('arr', ['bar', 'baz']) |
||||
|
||||
assert(arr == ['bar', 'baz'], 'set_variable(array) is broken') |
||||
|
||||
conf = configuration_data() |
||||
|
||||
conf.set('foo', ['bar', 'baz']) |
||||
|
||||
assert(conf.get('foo') == ['bar', 'baz'], 'configuration_data.set(array) is broken') |
||||
|
||||
arr = conf.get('does-not-exist', ['bar', 'baz']) |
||||
|
||||
assert(arr == ['bar', 'baz'], 'configuration_data.get with array fallback is broken') |
||||
|
||||
arr = meson.get_cross_property('does-not-exist', ['bar', 'baz']) |
||||
|
||||
assert(arr == ['bar', 'baz'], 'meson.get_cross_property with array fallback is broken') |
Loading…
Reference in new issue