This is an example markdown file with an annotated test command.
To see a summary of what commands will be run:
mm.py -d io.md
To run this file and validate the expected output:
mm.py io.md
Be sure to checkout the raw version of this file to see the annotations.
This is an annotated command. When the mm.py
utility is run, the following code block will be executed:
echo "test"
You can run multiple commands within the same block, and validate stderr as well.
Note: The
expected_stdout_lines
andexpected_stderr_lines
directives ignore output that doesn't match an expected line. Validation will fail only if expected lines do not appear in stdout/stderr. You can have extra output and still pass validation.
echo "test"
echo "another_output_line"
echo "test2"
echo "error" 1>&2
By default, all code blocks are expected to return 0. You can change this behavior with the directive expected_return_code
:
exit 1
A missing or null value for expected_return_code
will ignore all return codes.
exit 15
- Back to README
- On to Environment Variables