Commit f8cfe81a authored by Roland Senn's avatar Roland Senn

Improve tests for #17171

While backporting MR !1806 to 8.8.2 (!1885) I learnt the following:

* Tests with `expect_fail` do not compare `*.stderr` output files. So a test using `expect_fail` will not detect future regressions on the `stderr` output.
* To compare the `*.stderr` output files, I have to use the `exit_code(n)` function.
* When a release is made, tests with `makefile_test` are converted to use `run_command`.
* For the test `T17171a` the return code is `1` when running `makefile_test`, however it's `2` when running `run_command`.

Therefore I decided:

* To improve my tests for #17171
* To change test T17171a from `expect_fail` to `exit_code(2)`
* To change both tests from  `makefile_test` to `run_command`
parent 3a96a0b6
Main.hs:1:1: error:
The IO action ‘main’ is not exported by module ‘Main’
|
1 | module Main () where
| ^
......@@ -6,8 +6,11 @@ test('T11247', [req_interp, expect_broken(11247)], makefile_test, [])
test('T6132', [when(opsys('darwin'), expect_broken(6132))], compile, [''])
test('T17171a', [req_interp, expect_fail], makefile_test, [])
test('T17171b', req_interp, makefile_test, [])
test('T17171a',
[req_interp, exit_code(2), ignore_stdout, grep_errmsg(r'main')],
run_command, ['$MAKE -s --no-print-directory T17171a'])
test('T17171b', req_interp, run_command,
['$MAKE -s --no-print-directory T17171b'])
test('T-signals-child',
[ when(opsys('mingw32'), skip), req_interp
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment