mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2026-01-13 07:20:30 +01:00
Update test script.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Script to test PDFio against a directory of PDF files.
|
||||
#
|
||||
# Copyright © 2025 by Michael R Sweet.
|
||||
# Copyright © 2025-2026 by Michael R Sweet.
|
||||
#
|
||||
# Licensed under Apache License v2.0. See the file "LICENSE" for more
|
||||
# information.
|
||||
@@ -17,14 +17,24 @@ if test $# = 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||
ac_n=-n
|
||||
ac_c=
|
||||
else
|
||||
ac_n=
|
||||
ac_c='\c'
|
||||
fi
|
||||
|
||||
for file in $(find "$@" -name \*.pdf -print); do
|
||||
# Run testpdfio to test loading the file...
|
||||
echo $ac_n "\r$file$ac_c"
|
||||
./testpdfio $file >$file.log 2>&1
|
||||
if test $? = 0; then
|
||||
# Passed
|
||||
echo $ac_n "\r $ac_c"
|
||||
rm -f $file.log
|
||||
else
|
||||
# Failed, preserve log and write filename to stdout...
|
||||
echo $file
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user