gbranden pushed a commit to branch master in repository groff. commit adc405f91bd64ec79a79bdb931df35d82e83eaa3 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Jul 24 11:45:03 2025 -0500
[man]: Add test of synopsis (non-)adjustment. * tmac/tests/an-ext_synopses_do_not_automatically_adjust.sh: Add test. * tmac/tmac.am (tmac_TESTS): Run it. Test fails at this commit. --- ChangeLog | 6 +++ .../an-ext_synopses_do_not_automatically_adjust.sh | 60 ++++++++++++++++++++++ tmac/tmac.am | 1 + 3 files changed, 67 insertions(+) diff --git a/ChangeLog b/ChangeLog index 33c4a10e5..ce27da5e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-07-24 G. Branden Robinson <g.branden.robin...@gmail.com> + + * tmac/tests/an-ext_synopses_do_not_automatically_adjust.sh: Add + test. + * tmac/tmac.am (tmac_TESTS): Run it. + 2025-07-24 G. Branden Robinson <g.branden.robin...@gmail.com> * tmac/tests/an-ext_synopses_do_not_automatically_hyphenate.sh: diff --git a/tmac/tests/an-ext_synopses_do_not_automatically_adjust.sh b/tmac/tests/an-ext_synopses_do_not_automatically_adjust.sh new file mode 100755 index 000000000..cc7e638c3 --- /dev/null +++ b/tmac/tests/an-ext_synopses_do_not_automatically_adjust.sh @@ -0,0 +1,60 @@ +#!/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 3 2025-07-24 "groff test suite" +.SH Name +foo \- frobnicate a bar +.SH Synopsis +.tm GBR1: doc: .j=\n(.j +.ad l +.tm GBR2: doc: .j=\n(.j +.br +.B void *\c +.tm GBR3: doc: .j=\n(.j +.SY bsearch ( +.BI int\~ one , +.BI int\~ two , +.BI int\~ three , +.BI int\~ four , +.BI int\~ five , +.BI int\~ six , +.BI int\~ seven , +.BI int\~ eight , +.BI int\~ nine , +.BI int\~ ten , +.BI int\~ eleven ); +.YS +.' + +# Expected output: +# + +output=$(printf "%s\n" "$input" \ + | "$groff" -rLL=70n -man -Tascii -P-cbou) +echo "$output" +echo "$output" \ + | grep -Fq \ + 'void *bsearch(int one, int two, int three, int four, int five,' +exit + +# vim:set ai et sw=4 ts=4 tw=72: diff --git a/tmac/tmac.am b/tmac/tmac.am index b6f51d7dd..96fca458f 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_adjust.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 \ _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit