summaryrefslogtreecommitdiff
path: root/test cases/format/5 transform/meson.build
blob: d15fd18665176847cbd9e2a34ad9f21fb9e933dd (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
project('format')

fs = import('fs')

meson_cmd = find_program('meson')
file_compare = find_program(files('file_compare.py'))
config = get_option('fmt_config')

source = files('source.meson')
config_file = files(config + '.ini')
expected = files(config + '.expected.meson')

transform = custom_target(
    input: [config_file, source],
    output: 'transformed.meson',
    command: [
        meson_cmd,
        'format',
        '--output', '@OUTPUT@',
        '--configuration', '@INPUT@',
    ],
)


test(
    'transform',
    file_compare,
    args: [transform, expected],
)