groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 02/11: [mm]: Regression-test Savannah #64336.


From: G. Branden Robinson
Subject: [groff] 02/11: [mm]: Regression-test Savannah #64336.
Date: Sat, 19 Aug 2023 20:03:47 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit b44fad19eeab0ab4d123cb16aaa481c399535b48
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Aug 19 02:39:04 2023 -0500

    [mm]: Regression-test Savannah #64336.
    
    * contrib/mm/tests/flush-long-displays-at-end-of-input.sh: Do it.
    * contrib/mm/mm.am (mm_TESTS): Run test.
    
    Test fails at this commit.
---
 contrib/mm/ChangeLog                               |   7 ++
 contrib/mm/mm.am                                   |   1 +
 .../tests/flush-long-displays-at-end-of-input.sh   | 100 +++++++++++++++++++++
 3 files changed, 108 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 20366a7a9..2d0cefd49 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2023-08-19  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Regression-test Savannah #64336.
+
+       * tests/flush-long-displays-at-end-of-input.sh: Do it.
+       * mm.am (mm_TESTS): Run test.
+
 2023-08-16 G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * groff_mm.7.man: Document difference from DWB in paragraph
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index 690b268c8..4f3ef7c22 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -67,6 +67,7 @@ mm_TESTS = \
   contrib/mm/tests/MT-1-reports-all-TM-numbers.sh \
   contrib/mm/tests/MT_5_includes_AT_in_SG.sh \
   contrib/mm/tests/P-indentation-works.sh \
+  contrib/mm/tests/flush-long-displays-at-end-of-input.sh \
   contrib/mm/tests/indexing-works.sh \
   contrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh \
   contrib/mm/tests/mse_has-sufficient-footnote-space.sh \
diff --git a/contrib/mm/tests/flush-long-displays-at-end-of-input.sh 
b/contrib/mm/tests/flush-long-displays-at-end-of-input.sh
new file mode 100755
index 000000000..5172bd0fb
--- /dev/null
+++ b/contrib/mm/tests/flush-long-displays-at-end-of-input.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# Copyright (C) 2023 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"
+
+# Regression-test Savannah #64336.
+#
+# Emit keeps at end of input even if they internally break the page.
+
+# Double backslashes since this variable goes to printf(1).
+input='.P
+The modern conservative is engaged in one of man'"'"'s oldest exercises
+in moral philosophy;
+that is,
+the search for a superior moral justification for selfishness.
+.br
+.nr Ds 0 \\" Turn off vertical space before & after displays.
+.\\" This display is exactly long enough to float past the next
+.\\" non-displayed line on DWB 3.3 nroff/mm.  Heirloom Doctools loses the
+.\\" display entirely, no matter what its length, and puts a spurious
+.\\" blank line on the output, too.
+.DF
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+.\\" With 3 more lines, groff 1.22.4 mm loses the display, too.  In
+.\\" 1.23.0+Git, the display floats as it should and no text is lost.
+.if \\n(.g \\{\\
+47
+48
+49
+.\\}
+.DE
+\\(em J.\\& K.\\& Galbraith'
+
+output=$(printf "$input\n" | "$groff" -mm -Tascii -P-cbou)
+echo "$output"
+echo "$output" | grep -q 49
+
+# vim:set ai et sw=4 ts=4 tw=72:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]