gbranden pushed a commit to branch master
in repository groff.

commit 41ff2cc0a9c8959c8ff61b28bdec8d7a57df0d8b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 4 00:19:15 2025 -0500

    [man]: Regression-test long URI non-hyphenation.
    
    Regression-test non-hyphenation of lengthy URIs that format as their own
    link text due to the document specifying none between `MT` and `ME` or
    `UR` and `UE` macro calls.
    
    * tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh: Add
      test.
    
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          | 10 +++++
 ...do-not-hyphenate-hyperlink-with-no-link-text.sh | 43 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 54 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c1ab36180..9cc092728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-10-03  G. Branden Robinson <[email protected]>
+
+       [man]: Regression-test non-hyphenation of lengthy URIs that
+       format as their own link text due to the document specifying
+       none between `MT` and `ME` or `UR` and `UE` macro calls.
+
+       * tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh:
+       Add test.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2025-10-04  G. Branden Robinson <[email protected]>
 
        [troff]: Trivially refactor for clarity.
diff --git a/tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh 
b/tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh
new file mode 100755
index 000000000..8e3c29666
--- /dev/null
+++ b/tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright 2025 G. Branden Robinson
+#
+# 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-10-03 "groff test suite"
+.SH Name
+foo \- frobnicate a bar
+.SH Description
+Sed ut perspiciatis, unde omnis isteXXX
+The latest version is always available from
+.UR ftp://\:ftp.gnu.org/\:pub/\:gnu/\:bash/
+.UE
+and
+.UR http://\:git\:.savannah\:.gnu\:.org/\:cgit/\:bash\:.git/\:snapshot/\
+\:bash\-master\:.tar.\:gz
+.UE .
+.'
+
+# Use a short line length to provoke a break within the URL.
+output=$(printf "%s\n" "$input" \
+    | "$groff" -rLL=65n -man -T ascii -P -cbou)
+echo "$output"
+echo "$output" | grep -q 'bash-master'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 61b9626d9..a3414e02b 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -169,6 +169,7 @@ tmac_TESTS = \
   tmac/tests/an_degenerate-documents-work.sh \
   tmac/tests/an_degenerate-input-uses-sane-page-length.sh \
   tmac/tests/an_do-not-abbreviate-escape-using-TH-arguments.sh \
+  tmac/tests/an_do-not-hyphenate-hyperlink-with-no-link-text.sh \
   tmac/tests/an_font-remapping-does-not-affect-titles.sh \
   tmac/tests/an_handle-degenerate-input-quietly.sh \
   tmac/tests/an_hyphenation-mode-restoration-works.sh \

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

Reply via email to