gbranden pushed a commit to branch master
in repository groff.

commit 754ee7bad70a586f5c1c386a5b5ec985dfc4b08e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 5 00:10:23 2024 -0500

    [ms]: Further regression-test Savannah #64005.
    
    * tmac/tests/s_honor-page-break-in-text.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                |  7 ++++
 tmac/tests/s_honor-page-break-in-text.sh | 55 ++++++++++++++++++++++++++++++++
 tmac/tmac.am                             |  1 +
 3 files changed, 63 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f44443cb3..bfa8503a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-05  G. Branden Robinson <[email protected]>
+
+       [ms]: Further regression-test Savannah #64005.
+
+       * tmac/tests/s_honor-page-break-in-text.sh: Do it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2024-06-04  G. Branden Robinson <[email protected]>
 
        * tmac/doc.tmac: Drop nilpotent junk from end of file.
diff --git a/tmac/tests/s_honor-page-break-in-text.sh 
b/tmac/tests/s_honor-page-break-in-text.sh
new file mode 100755
index 000000000..530c3adc9
--- /dev/null
+++ b/tmac/tests/s_honor-page-break-in-text.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 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"
+
+fail=
+
+wail () {
+    echo "...FAILED" >&2
+    fail=YES
+}
+
+# Regression-test Savannah #64005 redux.
+
+input='.pl 18v
+.LP
+We schedule a page break at the next line break.
+'"'"'bp
+This lengthy rambling sentence
+with some lorem ipsum voluptatem filler
+should start and end on page 2 (\n%).
+.bp
+This sentence should start on page 3 (\n%).
+.pl \n(nlu'
+
+output=$(printf '%s\n' "$input" | "$groff" -Tascii -P-cbou -ms)
+echo "$output"
+
+echo "checking use of 'bp' with no-break control character" >&2
+echo "$output" | grep -Fqx 'start and end on page 2 (2).' || wail
+
+echo "checking use of 'bp' with normal control character" >&2
+echo "$output" | grep -Fqx 'This sentence should start on page 3 (3).' \
+    || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 32553d413..2a0548b1f 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -245,6 +245,7 @@ tmac_TESTS = \
   tmac/tests/s_XA-literal-no-argument-suppresses-leader.sh \
   tmac/tests/s_honor-MINGW-when-two-columns.sh \
   tmac/tests/s_honor-page-break-after-display.sh \
+  tmac/tests/s_honor-page-break-in-text.sh \
   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

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

Reply via email to