I have a folder with test cases named like test_1_in
, test_1_out
,
test_2_in
, test_2_out
etc. I want to write a script, that can test my program with these pairs, I suppose it would do something like this in a loop
diff <($program < $test_in) <($test_out)
So the question is what is the best way to do it in Bash? How to iterate through the pairs of files? And also how to capture exception, that is print some error message if diff
shows some difference?