~emersion/mrsh

ref: 845da7c44465fda142ca324c6ff57613a8c39ea2 mrsh/test/conformance/meson.build -rw-r--r-- 1.0 KiB
845da7c4Drew DeVault test: overhaul conformance tests 1 year, 22 days ago
                                                                                
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
harness = find_program('./harness.sh')

test_files = [
	'2.2-quoted-characters.sh',
]

failures = [
	'2.2.2-nested-single-quotes.fail.sh',
	# TODO: https://github.com/emersion/mrsh/issues/145
	#'2.2.3-alias-expansion.fail.sh',
]

undefined = [
	'2.2.3-backquote-nonterminated-squote.undefined.sh',
	'2.2.3-backquote-nonterminated-dquote.undefined.sh',
	'2.2.3-dquote-nonterminated-backquote.undefined.sh',
]

testenv = [
	'MRSH=@0@'.format(mrsh_exe.full_path()),
]

foreach test_file : test_files
	test(
		'conformance/' + test_file,
		harness,
		env: testenv,
		args: [join_paths(meson.current_source_dir(), test_file)],
	)
endforeach

foreach test_file : failures
	test(
		'conformance/' + test_file,
		harness,
		env: testenv,
		args: [join_paths(meson.current_source_dir(), test_file)],
		should_fail: true,
	)
endforeach

if get_option('test-undefined-behavior')
	foreach test_file : undefined
		test(
			'conformance/' + test_file,
			harness,
			env: testenv,
			args: [join_paths(meson.current_source_dir(), test_file)],
			should_fail: true,
		)
	endforeach
endif