2020-11-14 17:28:17 +03:00
|
|
|
#!/usr/bin/env sh
|
2018-09-21 15:42:55 +03:00
|
|
|
|
|
|
|
# Runs the executable and compares its output to the .expected file
|
2020-12-22 12:36:43 +03:00
|
|
|
export CARP_OPTS="$CARP_OPTS $1 --log-memory -b --no-profile"
|
|
|
|
./scripts/carp.sh && \
|
2020-05-11 12:52:58 +03:00
|
|
|
./out/Untitled > test/output/$1.output.actual 2>&1
|
2020-02-07 15:10:35 +03:00
|
|
|
echo $1
|
2018-09-21 15:42:55 +03:00
|
|
|
|
2020-05-11 12:52:58 +03:00
|
|
|
if ! diff --strip-trailing-cr test/output/$1.output.actual test/output/$1.output.expected; then
|
2018-09-21 15:42:55 +03:00
|
|
|
echo "$1 failed."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
rm test/output/$1.output.actual
|
|
|
|
fi
|