Debian Codegraph @

test cases/format/1 default/meson.build

raw
1 # This file is for testing meson format with default options
2
3 project('default format')
4
5 meson_cmd = find_program('meson')
6 meson_files = {
7 'self': files('meson.build'),
8 'comments': files('crazy_comments.meson'),
9 'indentation': files('indentation.meson'),
10 'gh13242': files('gh13242.meson'),
11 }
12
13 # Ensure empty function are formatted correctly on long lines
14 a = '@0@@1@@2@@3@@4@'.format('one', 'two', 'three', 'four', 'five').strip().strip()
15
16 _opt = get_option('opt') \
17 .disable_if(
18 true,
19 error_message: 'This is an error message because opt can\'t be enabled',
20 ) \
21 .enable_if(
22 false,
23 error_message: 'This is an error message because opt can\'t be disabled',
24 )
25
26 foreach name, f : meson_files
27 test(name, meson_cmd, args: ['format', '--check-only', f])
28 endforeach