aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/192 args flattening/meson.build
blob: 1dac2f912cbc1d763d1341dc86bac1bf82b600e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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')

arr = meson.get_external_property('does-not-exist', ['bar', 'baz'])
assert(arr == ['bar', 'baz'], 'meson.get_external_property with array fallback is broken')

arr = meson.get_external_property('does-not-exist', ['bar', 'baz'], native: true)
assert(arr == ['bar', 'baz'], 'meson.get_external_property native:true with array fallback is broken')

arr = meson.get_external_property('does-not-exist', ['bar', 'baz'], native: false)
assert(arr == ['bar', 'baz'], 'meson.get_external_property native:false with array fallback is broken')

# Test deprecated behaviour

conf.set(['foo', 'bar'])
message(conf.get('foo'))