We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0570419 commit 1320f96Copy full SHA for 1320f96
ctest.sh
@@ -94,6 +94,8 @@ for INFILE in "${INFILES[@]}"; do
94
OUTPUT=$(./a.out < "$INFILE")
95
# compare the output with the expected output
96
DIF="$(diff -Z "$OUTFILE" <(echo "$OUTPUT"))"
97
+ # print DIF
98
+ echo -e "$DIF"
99
if [ -n "$DIF" ]; then
100
# test failed
101
if [ -t 1 ]; then echo -e $(red "Test failed.")
@@ -117,7 +119,7 @@ for INFILE in "${INFILES[@]}"; do
117
119
echo -e "\n line "$OUT""
118
120
fi
121
done
- while [[ $GOT -ne $EXP ]]; do
122
+ while [[ $GOT -ne $EXP ]] && read -r line; do
123
# get next > lines until they match the number of < lines
124
read -r line
125
if [[ $line == ">"* ]]; then
0 commit comments