Minimal CLI tool to verify program output using a simple input/output test file.
myscript.iotest:
input1
---
output1
===
input2
---
output2
Run tests:
iotest myscript.iotest ./myscript.shEach of the two tests is run against ./myscript.sh, passing the input to
stdin and asserting that stdout matches the expected output.
-
Each test case consists of input and expected output.
-
Separate input and output with
---. -
Separate multiple tests with
===.