gbranden pushed a commit to branch master
in repository groff.

commit 36ea1e554d58f364297e698bc8805a9211810dc2
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Oct 20 00:33:29 2025 -0500

    [ms]: Test more starting-with-keep scenarios.
    
    * tmac/tests/s_start-document-with-keep-quietly.sh: Test more scenarios
      involving documents using keeps on a cover page.
    
    Prompted by feedback from Doug McIlroy; see <https://lists.gnu.org/
    archive/html/groff/2025-10/msg00045.html>.
    
    Test fails at this commit.
---
 ChangeLog                                        |  8 ++++
 tmac/tests/s_start-document-with-keep-quietly.sh | 54 ++++++++++++++++++------
 2 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd4517eac..a97a61d6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-10-20  G. Branden Robinson <[email protected]>
+
+       * tmac/tests/s_start-document-with-keep-quietly.sh: Test more
+       scenarios involving documents using keeps on a cover page.
+
+       Prompted by feedback from Doug McIlroy; see
+       <http://lists.gnu.org/archive/html/groff/2025-10/msg00045.html>.
+
 2025-10-20  G. Branden Robinson <[email protected]>
 
        * tmac/tests/an_degenerate-input-uses-sane-page-length.sh: Make
diff --git a/tmac/tests/s_start-document-with-keep-quietly.sh 
b/tmac/tests/s_start-document-with-keep-quietly.sh
index cf3238923..3675ed57a 100755
--- a/tmac/tests/s_start-document-with-keep-quietly.sh
+++ b/tmac/tests/s_start-document-with-keep-quietly.sh
@@ -32,23 +32,52 @@ wail () {
 
 input1='.
 .KS
-This is my keep.
-.TS
-L.
-table
-.TE
 .KE
-.LP
-Hello!
 .'
 
+echo "checking document starting with empty static keep" >&2
 error1=$(printf '%s\n' "$input1" | "$groff" -t -m s -z -T ascii 2>&1)
-echo "$error1"
+test -n "$error1" && echo "$error1"
 echo "$error1" | grep -q . && wail
 
+input2='.
+.KS
+foobar
+.KE
+.'
+
+echo "checking document starting with simply populated static keep" >&2
+error2=$(printf '%s\n' "$input2" | "$groff" -t -m s -z -T ascii 2>&1)
+test -n "$error2" && echo "$error2"
+echo "$error2" | grep -q . && wail
+
+# Starting a document with a floating keep should also work fine.
+
+input3='.
+.KF
+.KE
+.'
+
+echo "checking document starting with empty floating keep" >&2
+error3=$(printf '%s\n' "$input3" | "$groff" -t -m s -z -T ascii 2>&1)
+test -n "$error3" && echo "$error3"
+echo "$error3" | grep -q . && wail
+
+input4='.
+.KF
+bazqux
+.KE
+.'
+
+echo "checking document starting with simply populated floating keep" \
+    >&2
+error4=$(printf '%s\n' "$input4" | "$groff" -t -m s -z -T ascii 2>&1)
+test -n "$error4" && echo "$error4"
+echo "$error4" | grep -q . && wail
+
 # Starting with a table should also behave well.
 
-input2='.
+input5='.
 .KS
 .TS
 L.
@@ -59,9 +88,10 @@ table
 Hello!
 .'
 
-error2=$(printf '%s\n' "$input2" | "$groff" -t -m s -z -T ascii 2>&1)
-echo "$error2"
-echo "$error2" | grep -q . && wail
+echo "checking document starting with tbl-populated static keep" >&2
+error5=$(printf '%s\n' "$input5" | "$groff" -t -m s -z -T ascii 2>&1)
+test -n "$error5" && echo "$error5"
+echo "$error5" | grep -q . && wail
 
 test -z "$fail"
 

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

Reply via email to