groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 06/14: [tmac]: Fix style nits in test.


From: G. Branden Robinson
Subject: [groff] 06/14: [tmac]: Fix style nits in test.
Date: Mon, 24 Jan 2022 10:28:41 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 380957864cdc342ad3f4e29da6a4d9fd62264a05
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jan 22 04:01:58 2022 +1100

    [tmac]: Fix style nits in test.
    
    * tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh:
      - Emit complaints about test environment to standard error.
      - Replace lingering literal file name with variable expansion.
      - Skip test if gs(1) fails, instead of reporting failure.
      - Begin continued lines with operators, for visibility.
---
 ChangeLog                                                 | 10 ++++++++++
 tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh | 10 +++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9fe4e701..ab31f53d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,16 @@
        * src/devices/gropdf/gropdf.pl: A fix to importing pdf
        versions > 1.4.
 
+2022-01-22  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [tmac]: Fix style nits in test.
+
+       * tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh:
+       - Emit complaints about test environment to standard error.
+       - Replace lingering literal file name with variable expansion.
+       - Skip test if gs(1) fails, instead of reporting failure.
+       - Begin continued lines with operators, for visibility.
+
 2022-01-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [grohtml]: Fix misspelled member variable.
diff --git a/tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh 
b/tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh
index 02cdb3bb..ee642b6c 100755
--- a/tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh
+++ b/tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh
@@ -26,13 +26,13 @@ gnu_pdf="${abs_top_builddir:-.}/gnu.pdf"
 
 if ! command -v gs >/dev/null
 then
-    echo "cannot locate 'gs' command"
+    echo "cannot locate 'gs' command" >&2
     exit 77 # skip
 fi
 
 if [ -e "$gnu_pdf" ]
 then
-    echo "temporary output file gnu.pdf already exists"
+    echo "temporary output file '$gnu_pdf' already exists" >&2
     exit 77 # skip
 fi
 
@@ -51,11 +51,11 @@ if ! gs -o - -sDEVICE=pdfwrite -f "$gnu_eps" \
     > "$gnu_pdf"
 then
     echo "gs command failed" >&2
-    fail=YES
+    exit 77 # skip
 fi
 
-test -z $fail && \
-    printf '%s\n' "$input" | "$groff" -Tpdf -U -z || fail=YES
+test -z $fail \
+    && printf '%s\n' "$input" | "$groff" -Tpdf -U -z || fail=YES
 
 rm -f "$gnu_pdf"
 test -z $fail



reply via email to

[Prev in Thread] Current Thread [Next in Thread]