tests: permit multiple inputs on a single test
authorJean Privat <jean@pryen.org>
Wed, 12 Mar 2014 14:27:31 +0000 (10:27 -0400)
committerJean Privat <jean@pryen.org>
Wed, 12 Mar 2014 14:27:31 +0000 (10:27 -0400)
commite0c913615b41b4a56e015cf7897967ee9c0f3f1f
tree8b22b4296fe0f54acc01019c86d23dd45b0cd2d9
parentf42a84f00015f8db3f8f32f7373d5336f8a66444
tests: permit multiple inputs on a single test

Currently, for each program, if a `name.inputs` file exists, it is used for input for
all executions (for a total of alts * (args+1) executions).

Now a specific input can be used for each specific args.
This distinct input file is the one named with the basename of the res file.

eg. for the program `some_test.nit`, the file `some_test_args2.inputs` is
used as input for the execution associated to the second
line of the `some_test.args` file.
The result of the execution is still `some_test_args2.res`.

If there is no specific inputs file, the previous behavior remains:
`some_test.inputs` is used if it exists, else `/dev/null` is used.

The point of this patch is to enable specific CLI interactive programs,
like the debugger or nitx, to have automatizable regression tests.

Signed-off-by: Jean Privat <jean@pryen.org>
tests/tests.sh