mirror of
https://github.com/usatiuk/psil.git
synced 2025-10-28 18:57:48 +01:00
simple tests
This commit is contained in:
31
clitests/testall.sh
Executable file
31
clitests/testall.sh
Executable 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
|
||||
Reference in New Issue
Block a user