gbranden pushed a commit to branch master
in repository groff.

commit add13af9892fe722daeb02f6ceaf5b4b96598207
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jul 24 11:38:48 2025 -0500

    [man]: Add test of synopsis (non-)hyphenation.
    
    * tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh: Add
      test.
    * tmac/tmac.am (tmac_TESTS): Run it.
---
 ChangeLog                                          |  6 +++
 ...-ext_synopses_do_not_automatically_hyphenate.sh | 56 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 63 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index cc40150ae..33c4a10e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-07-24  G. Branden Robinson <[email protected]>
+
+       * tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh:
+       Add test.
+       * tmac/tmac.am (tmac_TESTS): Run it.
+
 2025-07-24  Deri James  <[email protected]>
 
        * font/devpdf/util/BuildFoundries.pl: If any warnings issued
diff --git a/tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh 
b/tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh
new file mode 100755
index 000000000..97d64c864
--- /dev/null
+++ b/tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+input='.
+.TH foo 1 2025-07-24 "groff test suite"
+.SH Name
+foo \- frobnicate a bar
+.SH Synopsis
+.SY foo
+.RI [ antidisestablishmentarianism
+.RI [ pneumonoultramicroscopicsilicovolcanoconiosis ]]
+.YS
+.'
+
+# Expected output:
+#
+# foo(1)                  General Commands Manual                 foo(1)
+#
+# Name
+#      foo - frobnicate a bar
+#
+# Synopsis
+#      foo [antidisestablishmentarianism
+#          [pneumonoultramicroscopicsilicovolcanoconiosis]]
+#
+# groff test suite              2025-07-24                        foo(1)
+
+output=$(printf "%s\n" "$input" \
+    | "$groff" -rLL=70n -man -Tascii -P-cbou)
+echo "$output"
+echo "$output" | grep -q antidisestablishmentarianism \
+  && echo "$output" | grep -q \
+    pneumonoultramicroscopicsilicovolcanoconiosis
+
+exit
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 80c18ae26..b6f51d7dd 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -135,6 +135,7 @@ tmac_TESTS = \
   tmac/tests/an-ext_MT-works.sh \
   tmac/tests/an-ext_SY-and-YS-work.sh \
   tmac/tests/an-ext_UR-works.sh \
+  tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh \
   tmac/tests/an_AT-and-UC-footer-saved-and-restored.sh \
   tmac/tests/an_CS-register-works.sh \
   tmac/tests/an_CT-register-works.sh \

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

Reply via email to