summaryrefslogtreecommitdiff
path: root/test cases/format/3 editorconfig/meson.build
blob: 2468411493c39febe1c3fac7246a81b6c23669b8 (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
32
# This file is for testing meson format with editor config

project('default format')

meson_cmd = find_program('meson')
meson_files = {
	'self': files('meson.build'),
	'comments': files('crazy_comments.meson'),
	'indentation': files('indentation.meson'),
	'subdir editorconfig': files('subdir/sub.meson'),
}

foreach name, f : meson_files
	test(
		name,
		meson_cmd,
		args: ['format', '-e', '--check-only', f],
	)

	# Test that .editorconfig can also be loaded from options file
	test(
		name + '-fromconfig',
		meson_cmd,
		args: [
			'format',
			'-c',
			files('options.ini'),
			'--check-only',
			f,
		],
	)
endforeach