gbranden pushed a commit to branch master
in repository groff.

commit 0a0a2f6508b706d1fd814279c110fc6c7cdf6e37
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Oct 9 14:53:07 2025 -0500

    [ms]: Regression-test Savannah #64529.
    
    * tmac/tests/s_start-document-with-keep-quietly.sh: Add test.
    
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                        |  7 +++
 tmac/tests/s_start-document-with-keep-quietly.sh | 68 ++++++++++++++++++++++++
 tmac/tmac.am                                     |  1 +
 3 files changed, 76 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a702ca985..12f53e2a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-10-09  G. Branden Robinson <[email protected]>
+
+       [ms]: Regression-test Savannah #64529.
+
+       * tmac/tests/s_start-document-with-keep-quietly.sh: Add test.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2025-10-09  G. Branden Robinson <[email protected]>
 
        Update with respect to Unicode 17, per procedure in
diff --git a/tmac/tests/s_start-document-with-keep-quietly.sh 
b/tmac/tests/s_start-document-with-keep-quietly.sh
new file mode 100755
index 000000000..cf3238923
--- /dev/null
+++ b/tmac/tests/s_start-document-with-keep-quietly.sh
@@ -0,0 +1,68 @@
+#!/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"
+
+fail=
+
+wail () {
+    echo "...FAILED" >&2
+    fail=YES
+}
+
+# Starting a document with a keep (that is, before calling `RP`, `LP`,
+# or some other initialization-capable macro) should not produce
+# spurious diagnostics.  See Savannah #64529.
+
+input1='.
+.KS
+This is my keep.
+.TS
+L.
+table
+.TE
+.KE
+.LP
+Hello!
+.'
+
+error1=$(printf '%s\n' "$input1" | "$groff" -t -m s -z -T ascii 2>&1)
+echo "$error1"
+echo "$error1" | grep -q . && wail
+
+# Starting with a table should also behave well.
+
+input2='.
+.KS
+.TS
+L.
+table
+.TE
+.KE
+.LP
+Hello!
+.'
+
+error2=$(printf '%s\n' "$input2" | "$groff" -t -m s -z -T ascii 2>&1)
+echo "$error2"
+echo "$error2" | grep -q . && wail
+
+test -z "$fail"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index dec9ecadf..bff99f2d6 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -251,6 +251,7 @@ tmac_TESTS = \
   tmac/tests/s_mark-column-start-correctly.sh \
   tmac/tests/s_no-excess-space-around-displays.sh \
   tmac/tests/s_rejects-too-short-page-lengths.sh \
+  tmac/tests/s_start-document-with-keep-quietly.sh \
   tmac/tests/s_vertical-margins-are-correct.sh
 TESTS += $(tmac_TESTS)
 EXTRA_DIST += $(tmac_TESTS)

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

Reply via email to