Carp/test/check.sh

12 lines
345 B
Bash
Raw Normal View History

2020-11-14 17:28:17 +03:00
#!/usr/bin/env sh
2018-04-10 13:34:36 +03:00
# Checks the code (using --check) and compares the output to the .expected file
2020-11-09 13:47:15 +03:00
./scripts/carp.sh $1 --log-memory --check > test/output/$1.output.actual 2>&1
2018-04-10 13:34:36 +03:00
if ! diff --strip-trailing-cr test/output/$1.output.actual test/output/$1.output.expected; then
2018-04-10 13:34:36 +03:00
echo "$1 failed."
exit 1
else
rm test/output/$1.output.actual
fi