If you would like to make an extensive test suite more structured, rather than having all the checks in one flat expected file, i.e. you want to run test once, but check many well-structured suites of test cases.
Now, instead of file, you can have a directory called expected.
For example, suppose, you have a test called big-test:
> tree big-test/
│ ├── address
│ │ └── check_city
│ └── check_temperature
with the files looking like this:
> cat big-test/test
> cat big-test/expected/address/check_city
> cat big-test/expected/check_temperature
When you run the test, the conditions in check_city and check_temperature will be checked:
> cd big-test
comma-test-run: 1 test[s] in subdirectories of /home/seva/src/comma/big-test: running...
comma-test-run: test 1 of 1: .: started...
comma-test-run: test 1 of 1: .: running...
Test output does not match expected:
comma-test-run: .: failed
comma-test-run: 1 test[s] in subdirectories of /home/seva/src/comma/big-test: 1 test[s] out of 1 failed