The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
2 years ago
|
project('configure file output format')
|
||
|
|
||
|
data = configuration_data()
|
||
|
data.set_quoted('str', 'hello world!', description: '''This is
|
||
|
a multiline
|
||
|
description''')
|
||
|
data.set('unquoted', 'float')
|
||
|
data.set('int', 42, description: 'ultimate question of life, the universe, and everything')
|
||
|
data.set('bool', true)
|
||
|
data.set('false', false)
|
||
|
|
||
|
config_h = configure_file(
|
||
|
configuration: data,
|
||
|
output_format: 'c',
|
||
|
output: 'config.h'
|
||
|
)
|
||
|
|
||
|
config_nasm = configure_file(
|
||
|
configuration: data,
|
||
|
output_format: 'nasm',
|
||
|
output: 'config.nasm'
|
||
|
)
|
||
|
|
||
|
config_json = configure_file(
|
||
|
configuration: data,
|
||
|
output_format: 'json',
|
||
|
output: 'config.json'
|
||
|
)
|
||
|
|
||
|
py = find_program('python3')
|
||
|
compare_py = files('compare.py')
|
||
|
expected_config_h = files('expected/config.h')
|
||
|
expected_config_nasm = files('expected/config.nasm')
|
||
|
expected_config_json = files('expected/config.json')
|
||
|
|
||
|
test('c_output', py, args: [compare_py, expected_config_h, config_h])
|
||
|
test('nasm_output', py, args: [compare_py, expected_config_nasm, config_nasm])
|
||
|
test('json_output', py, args: [compare_py, expected_config_json, config_json])
|