test script looping through test files

master
Martin Scheidt 2022-01-16 17:43:56 +01:00
parent 122c759f57
commit 9ea0677d16
1 changed files with 7 additions and 3 deletions

View File

@ -68,7 +68,11 @@ check_imagemagick
mkdir -p .testing
# TODO: for-loop
pdflatex -output-directory=.testing -interaction=batchmode -halt-on-error *.tex 2>&1 > /dev/null
compare -metric DSSIM -colorspace RGB .testing/*.pdf *_expected.pdf .testing/*_diff.png
for TEST in $1*.tex; do
echo "Testing: ${TEST%.*}"
pdflatex -output-directory=.testing -interaction=batchmode -halt-on-error $TEST 2>&1 > /dev/null
compare -metric DSSIM -colorspace RGB .testing/${TEST%.*}.pdf ${TEST%.*}_expected.pdf .testing/${TEST%.*}_diff.png
echo "% difference"
done
log_n "tests passed!"