From 6fd1b781dccc22bc5d4e392b750c306c5ca243d4 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 11 Jan 2026 13:46:04 -0500 Subject: [PATCH] Update test script. --- test-corpus.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test-corpus.sh b/test-corpus.sh index f37ba1b..0288890 100755 --- a/test-corpus.sh +++ b/test-corpus.sh @@ -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