gbranden pushed a commit to branch master
in repository groff.

commit 9b036d8d4982dba29f0841ee6a2454e26d78f99b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jan 27 12:20:52 2026 -0600

    [mm]: Fix spurious test failures on Alpine Linux.
    
    * contrib/mm/tests/Np-register-works.sh:
    * contrib/mm/tests/date-localization-works.sh:
    * contrib/mm/tests/nP-works.sh: Avoid use of "cat -s" in test scripts.
      It's not portable.  Omit entirely or replace with (not equivalent but
      close enough for our purposes) "sed '/^$/d'".  Fixes spurious test
      failure on Alpine Linux.  Thanks to Bruno Haible for the report.
    
    Also update Vim modelines; unabbreviate parameters for readability by
    humans.
---
 contrib/mm/ChangeLog                        | 10 ++++++++++
 contrib/mm/tests/Np-register-works.sh       |  4 ++--
 contrib/mm/tests/date-localization-works.sh |  4 ++--
 contrib/mm/tests/nP-works.sh                |  6 +++---
 4 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 58e5779b9..aa8af2d9a 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2026-01-27  G. Branden Robinson <[email protected]>
+
+       * tests/Np-register-works.sh:
+       * tests/date-localization-works.sh:
+       * tests/nP-works.sh: Avoid use of "cat -s" in test scripts.
+       It's not portable.  Omit entirely or replace with (not
+       equivalent but close enough for our purposes) "sed '/^$/d'".
+       Fixes spurious test failure on Alpine Linux.  Thanks to Bruno
+       Haible for the report.
+
 2026-01-21  G. Branden Robinson <[email protected]>
 
        * mm.am: Drop unused macro `mm_builddir`.  Automake itself
diff --git a/contrib/mm/tests/Np-register-works.sh 
b/contrib/mm/tests/Np-register-works.sh
index 865156e15..00f6fb704 100755
--- a/contrib/mm/tests/Np-register-works.sh
+++ b/contrib/mm/tests/Np-register-works.sh
@@ -72,7 +72,7 @@ quis nostrum exercitationem ullam corporis suscipitlaboriosam,
 nisi ut aliquid ex ea commodi consequatur?
 .'
 
-output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou | cat -s)
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
 echo "$output"
 
 # Expected output:
@@ -147,4 +147,4 @@ echo "$output" | grep -Eq '^ {7}ullam *corporis' || wail
 
 test -z "$fail"
 
-# vim:set ai et sw=4 ts=4 tw=72:
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/contrib/mm/tests/date-localization-works.sh 
b/contrib/mm/tests/date-localization-works.sh
index 11cf35320..02349b0f8 100755
--- a/contrib/mm/tests/date-localization-works.sh
+++ b/contrib/mm/tests/date-localization-works.sh
@@ -42,7 +42,7 @@ letter.
 for lang in cs de en es fr it ru sv
 do
     output=$(printf "%s\n" "$input" \
-             | "$groff" -m m -m $lang -T utf8 -P -cbou | cat -s)
+             | "$groff" -m m -m $lang -T utf8 -P -cbou | sed '/^$/d')
     echo "$output"
     case $lang in
         cs) pattern='6 .+jen 2024' ;;
@@ -60,4 +60,4 @@ done
 
 test -z "$fail"
 
-# vim:set ai et sw=4 ts=4 tw=72:
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/contrib/mm/tests/nP-works.sh b/contrib/mm/tests/nP-works.sh
index 82b85b3c9..61ab39fe3 100755
--- a/contrib/mm/tests/nP-works.sh
+++ b/contrib/mm/tests/nP-works.sh
@@ -80,10 +80,10 @@ quis nostrum exercitationem ullam corporis 
suscipitlaboriosam,
 nisi ut aliquid ex ea commodi consequatur?
 .'
 
-output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou | cat -s)
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
 echo "$output"
 
-# Expected output:
+# Expected output (consecutive blank lines condensed):
 #
 #                                    - 1 -
 #
@@ -172,4 +172,4 @@ echo "$output" | grep -Eq '^ {14}ullam *corporis' || wail
 
 test -z "$fail"
 
-# vim:set ai et sw=4 ts=4 tw=72:
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to