smoke
smoke copied to clipboard
Support for a way to run the same kind of test on many files
One use case for Smoke is to simply provide many different potential input and output files, and compare them. However, it gets old doing the following:
tests:
- name: thing 1
stdin:
file: thing1.in
stdout:
file: thing1.out
- name: thing 2
stdin:
file: thing2.in
stdout:
file: thing2.out
- name: thing 3
stdin:
file: thing3.in
stdout:
file: thing3.out
# ...
Not only is it monotonous, but error-prone.
@jaspervdj suggested finding a better way to avoid this repetition, just like goldplate does.
Perhaps we could do something like this:
tests:
- name: %
stdin:
file: *.in
stdout:
file: %.out
This would detect the glob expression in stdin.file, and expand it to the long form above, using % as the placeholder for the pattern matched by *.
Alternatively, we could look at Dhall as a way of programmatically generating configuration files safely.
Using Dhall would be quite nice, indeed.