gbranden pushed a commit to branch master
in repository groff.

commit a932d6934b1cd6e688c4a6698dc7ec86eb172bee
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Mar 20 20:46:48 2026 -0500

    Skip more tests on buggy Solaris.
    
    * src/roff/groff/tests/ab-request-works.sh:
    * src/roff/groff/tests/handle-special-input-code-points.sh:
    * tmac/tests/an-ext_MR-works.sh:
    * tmac/tests/an_MR-works.sh:
    * tmac/tests/an_font-remapping-does-not-affect-titles.sh: Skip test if
      the shell in "/usr/xpg4/bin" mis-implements the `unset` shell built-in
      command.
---
 ChangeLog                                                | 12 ++++++++++++
 src/roff/groff/tests/ab-request-works.sh                 |  8 +++++++-
 src/roff/groff/tests/handle-special-input-code-points.sh |  8 +++++++-
 tmac/tests/an-ext_MR-works.sh                            | 12 +++++++++---
 tmac/tests/an_MR-works.sh                                | 12 +++++++++---
 tmac/tests/an_font-remapping-does-not-affect-titles.sh   |  8 +++++++-
 6 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8b251f5ea..65f2eef53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2026-03-20  G. Branden Robinson <[email protected]>
+
+       Skip more tests on buggy Solaris.
+
+       * src/roff/groff/tests/ab-request-works.sh:
+       * src/roff/groff/tests/handle-special-input-code-points.sh:
+       * tmac/tests/an-ext_MR-works.sh:
+       * tmac/tests/an_MR-works.sh:
+       * tmac/tests/an_font-remapping-does-not-affect-titles.sh: Skip
+       test if the shell in "/usr/xpg4/bin" mis-implements the `unset`
+       shell built-in command.
+
 2026-03-20  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (abort_request): Trivially refactor;
diff --git a/src/roff/groff/tests/ab-request-works.sh 
b/src/roff/groff/tests/ab-request-works.sh
index 7126e493c..17ce262b4 100755
--- a/src/roff/groff/tests/ab-request-works.sh
+++ b/src/roff/groff/tests/ab-request-works.sh
@@ -25,7 +25,13 @@ groff="${abs_top_builddir:-.}/test-groff"
 # which has to be killed.  Using "-z" to avoid this masks the bug.
 
 # Keep preconv from being run.
-unset GROFF_ENCODING
+#
+# The "unset" in Solaris /usr/xpg4/bin/sh can actually fail.
+if ! unset GROFF_ENCODING
+then
+    echo "unable to clear environment; skipping" >&2
+    exit 77 # skip
+fi
 
 for d in ascii dvi html latin1 lbp lj4 pdf ps utf8
 do
diff --git a/src/roff/groff/tests/handle-special-input-code-points.sh 
b/src/roff/groff/tests/handle-special-input-code-points.sh
index 668da00dd..b937ca583 100755
--- a/src/roff/groff/tests/handle-special-input-code-points.sh
+++ b/src/roff/groff/tests/handle-special-input-code-points.sh
@@ -23,7 +23,13 @@ groff="${abs_top_builddir:-.}/test-groff"
 # Regression-test Savannah #58962.
 
 # Keep preconv from being run.
-unset GROFF_ENCODING
+#
+# The "unset" in Solaris /usr/xpg4/bin/sh can actually fail.
+if ! unset GROFF_ENCODING
+then
+    echo "unable to clear environment; skipping" >&2
+    exit 77 # skip
+fi
 
 input='.if "�"\~" .tm input no-break space matches \\~
 .if "�"\%" .tm input soft hyphen matches \\%'
diff --git a/tmac/tests/an-ext_MR-works.sh b/tmac/tests/an-ext_MR-works.sh
index 435d481eb..c75ce232a 100755
--- a/tmac/tests/an-ext_MR-works.sh
+++ b/tmac/tests/an-ext_MR-works.sh
@@ -20,9 +20,6 @@
 
 groff="${abs_top_builddir:-.}/test-groff"
 
-# Keep preconv from being run.
-unset GROFF_ENCODING
-
 fail=
 
 wail () {
@@ -30,6 +27,15 @@ wail () {
     fail=YES
 }
 
+# Keep preconv from being run.
+#
+# The "unset" in Solaris /usr/xpg4/bin/sh can actually fail.
+if ! unset GROFF_ENCODING
+then
+    echo "unable to clear environment; skipping" >&2
+    exit 77 # skip
+fi
+
 input='.TH foo 1 2021-10-06 "groff test suite"
 .SH Name
 .ec @
diff --git a/tmac/tests/an_MR-works.sh b/tmac/tests/an_MR-works.sh
index d86733707..cd933b15d 100755
--- a/tmac/tests/an_MR-works.sh
+++ b/tmac/tests/an_MR-works.sh
@@ -20,9 +20,6 @@
 
 groff="${abs_top_builddir:-.}/test-groff"
 
-# Keep preconv from being run.
-unset GROFF_ENCODING
-
 fail=
 
 wail () {
@@ -30,6 +27,15 @@ wail () {
     fail=yes
 }
 
+# Keep preconv from being run.
+#
+# The "unset" in Solaris /usr/xpg4/bin/sh can actually fail.
+if ! unset GROFF_ENCODING
+then
+    echo "unable to clear environment; skipping" >&2
+    exit 77 # skip
+fi
+
 input='.TH foo 1 2021-10-06 "groff test suite"
 .SH Name
 foo \\- a command with a very short name
diff --git a/tmac/tests/an_font-remapping-does-not-affect-titles.sh 
b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
index cc6dc8428..7937dcc83 100755
--- a/tmac/tests/an_font-remapping-does-not-affect-titles.sh
+++ b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
@@ -28,7 +28,13 @@ groff="${abs_top_builddir:-.}/test-groff"
 # page footers and headers.
 
 # Keep preconv from being run.
-unset GROFF_ENCODING
+#
+# The "unset" in Solaris /usr/xpg4/bin/sh can actually fail.
+if ! unset GROFF_ENCODING
+then
+    echo "unable to clear environment; skipping" >&2
+    exit 77 # skip
+fi
 
 input='.TH \\fIfoo\\fP 1 2021-10-04 "groff test suite"
 .SH Name

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

Reply via email to