simple tests

This commit is contained in:
2024-01-03 19:06:13 +01:00
parent ff45c72b7a
commit 7c54d16273
5 changed files with 49 additions and 2 deletions

31
clitests/testall.sh Executable file
View File

@@ -0,0 +1,31 @@
#! /bin/bash
cd "$(dirname "$0")"
FAILED=()
PSIL="../cmake-build-debug/src/psil"
for FILE in *.psil; do
echo "TESTING $FILE"
$PSIL -f $FILE --repl- > $FILE.res
if [ $? -ne 0 ]; then
FAILED+=("test-"$FILE)
continue
fi
diff -w $FILE.res $FILE.ex
if [ $? -ne 0 ]; then
FAILED+=("test-"$FILE)
continue
fi
rm $FILE.res
done
if [ ${#FAILED[@]} -eq 0 ]; then
echo "ALL TESTS PASSED"
else
echo "FAILED: ${FAILED[@]}"
exit -1
fi