groff-commit
[Top][All Lists]
Advanced

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

[groff] 17/80: [hdtbl]: Fix Savannah #66479 (1b/2).


From: G. Branden Robinson
Subject: [groff] 17/80: [hdtbl]: Fix Savannah #66479 (1b/2).
Date: Sat, 30 Nov 2024 04:02:14 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit ec594cf894f367c757da500c8870a0b706cc8acd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 03:07:17 2024 -0600

    [hdtbl]: Fix Savannah #66479 (1b/2).
    
    * contrib/hdtbl/examples/test-hdtbl.sh.in: Work around macOS wc(1)'s
      right-alignment of its integer output field.
---
 contrib/hdtbl/ChangeLog                 | 7 +++++++
 contrib/hdtbl/examples/test-hdtbl.sh.in | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index 2426bce73..4a272c74b 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,10 @@
+2024-11-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Fix Savannah #66479 (1b/2).
+
+       * examples/test-hdtbl.sh.in: Work around macOS wc(1)'s
+       right-alignment of its integer output field.
+
 2024-11-21  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * examples/test-hdtbl.sh.in: Update test expectations to reflect
diff --git a/contrib/hdtbl/examples/test-hdtbl.sh.in 
b/contrib/hdtbl/examples/test-hdtbl.sh.in
index 0971fce31..3b5088db6 100644
--- a/contrib/hdtbl/examples/test-hdtbl.sh.in
+++ b/contrib/hdtbl/examples/test-hdtbl.sh.in
@@ -43,6 +43,8 @@ check_number_pages()
 
     res=$("$gs_program" -o /dev/null/ -sDEVICE=bbox "$1" 2>&1 \
           | grep HiResBoundingBox | wc -l)
+    # macOS `wc` prefixes the line count with spaces.  Get rid of them.
+    res=$(expr "$res" + 0) || exit 99
 
     if [ "$res" != $2 ]
     then



reply via email to

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