gbranden pushed a commit to branch master
in repository groff.

commit 93d7d5e7ab01400314fef9dd17ec47ba51b3095b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon May 6 04:51:26 2024 -0500

    [man]: Add another test case for `SY` and `YS`.
    
    * tmac/tests/an-ext_SY-and-YS-work.sh: Add test case exercising correct
      suspension of automatic hyphenation.  Thanks to Alex Colomar for the
      report and a reproducer.
    
    Test fails at this commit.
---
 ChangeLog                           |  6 +++++
 tmac/tests/an-ext_SY-and-YS-work.sh | 51 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5a7be7e01..72ada35e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-06  G. Branden Robinson <[email protected]>
+
+       * tmac/tests/an-ext_SY-and-YS-work.sh: Add test case exercising
+       correct suspension of automatic hyphenation.  Thanks to Alex
+       Colomar for the report and a reproducer.
+
 2024-05-06  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.h (class environment): Rename member
diff --git a/tmac/tests/an-ext_SY-and-YS-work.sh 
b/tmac/tests/an-ext_SY-and-YS-work.sh
index 54c334539..a3da599d2 100755
--- a/tmac/tests/an-ext_SY-and-YS-work.sh
+++ b/tmac/tests/an-ext_SY-and-YS-work.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2023 Free Software Foundation, Inc.
+# Copyright (C) 2023-2024 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -94,6 +94,55 @@ echo "$output" \
         -e '}' \
     | grep -q . || wail
 
+# Thanks to Alex Colomar for the meat of the following test case.
+
+input2='.TH foo 3 2024-05-06 "groff test suite"
+.SH Name
+foo \\- a small library for converting strings to integers
+.
+.
+.SH Synopsis
+.
+.B int
+.SY a2i (
+.B TYPE,
+.BI TYPE\~*restrict\~ n ,
+.BI const\~char\~* s ,
+.BI char\~**_Nullable\~restrict\~ endp ,
+.BI int\~ base ,
+.BI TYPE\~ min ,
+.BI TYPE\~ max );
+.YS .
+.
+.B int
+.SY a2s (
+.B TYPE,
+.BI TYPE\~*restrict\~ n ,
+.BI const\~char\~* s ,
+.BI char\~**_Nullable\~restrict\~ endp ,
+.BI int\~ base ,
+.BI TYPE\~ min ,
+.BI TYPE\~ max );
+.YS .
+.
+.B int
+.SY a2u (
+.B TYPE,
+.BI TYPE\~*restrict\~ n ,
+.BI const\~char\~* s ,
+.BI char\~**_Nullable\~restrict\~ endp ,
+.BI int\~ base ,
+.BI TYPE\~ min ,
+.BI TYPE\~ max );
+.YS'
+
+output2=$(echo "$input2" | "$groff" -rLL=80n -man -T ascii -P -cbou)
+echo "$output2"
+
+echo 'checking for automatic hyphenation disablement inside synopsis' \
+    >&2
+echo "$output2" | grep -q 're-$' && wail
+
 test -z "$fail"
 
 # vim:set ai et sw=4 ts=4 tw=72:

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

Reply via email to