IO-Test: Check output in files
Implement the logic to check the output produced in files.
The IO-Parser should handle files using the following syntax.
f> "expected_file.txt" "file_with_expected_content.txt" "initial_file_content.txt"
with:
- First parameter: Full path to the expected file which was produced by the C-program.
- Second parameter: Full path to the file containing the expected content (may include regexes).
- Third parameter: Optional. Full path to the file containing the content the file should have at program start.
This check should ensure that after the execution of the C-program the following requirements are met:
- The file exists and is a regular file.
- The file is readable and writeable.
- The file content matches the regex.
Potential Issues:
- How should we handle absolute paths?
- Should some directories be protected (e.g.,
/etc
)?