✨
This commit is contained in:
28
test.sh
Normal file
28
test.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#! /usr/bin/bash
|
||||
|
||||
for f in ./tests/*.plthy; do
|
||||
filename=$(basename $f .plthy)
|
||||
python ./plthy -i "tests/$filename.plthy" > "tests/$filename.output"
|
||||
|
||||
printf '%-20s' "${filename/_/" "} "
|
||||
|
||||
if test -f "tests/$filename.expected1"; then
|
||||
match_found=0
|
||||
for g in ./tests/$filename.expected*; do
|
||||
if cmp -s "$g" "tests/$filename.output"; then
|
||||
echo "✓"
|
||||
match_found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $match_found -eq 0 ]; then
|
||||
echo "X"
|
||||
fi
|
||||
else
|
||||
if cmp -s "tests/$filename.expected" "tests/$filename.output"; then
|
||||
echo "✓"
|
||||
else
|
||||
echo "X"
|
||||
fi
|
||||
fi
|
||||
done
|
Reference in New Issue
Block a user