CS3413/Assignment5/testing/test3.sh

18 lines
429 B
Bash
Raw Permalink Normal View History

2023-11-02 22:46:14 -03:00
#!/usr/bin/env bash
2023-11-04 23:34:31 -03:00
counter=1
2023-11-02 22:46:14 -03:00
# Do this forever
while true; do
# Capture output of the command
output=$(../build/Assignment5 < ../documentation/a5_sample_input_3.txt)
# compare against output3.txt
if [ "$output" != "$(cat output3.txt)" ]; then
echo "Test 3 failed"
# show output
echo "$output"
exit 1
fi
2023-11-04 23:34:31 -03:00
echo "Test 3 passed $counter times"
counter=$((counter+1))
2023-11-02 22:46:14 -03:00
done