groff-commit
[Top][All Lists]
Advanced

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

[groff] 13/25: [mm]: Regression-test Savannah #66380.


From: G. Branden Robinson
Subject: [groff] 13/25: [mm]: Regression-test Savannah #66380.
Date: Tue, 29 Oct 2024 02:26:05 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 5a18485eb26094c5991f2764f1bd06876a1b2e11
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Oct 26 13:42:59 2024 -0500

    [mm]: Regression-test Savannah #66380.
    
    Regression-test Savannah #66380 (blocked letters should put a blank line
    before the date).
    
    * contrib/mm/tests/LT-BL-spaces-before-date.sh: Do it.
    * contrib/mm/mm.am (mm_TESTS): Run test.
    
    Test fails at this commit.
---
 contrib/mm/ChangeLog                         |  8 ++++
 contrib/mm/mm.am                             |  1 +
 contrib/mm/tests/LT-BL-spaces-before-date.sh | 55 ++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index bcaa46c64..e64cecf4b 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-26  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Regression-test Savannah #66380 (blocked letters should put a
+       blank line before the date).
+
+       * tests/LT-BL-spaces-before-date.sh: Do it.
+       * mm.am (mm_TESTS): Run test.
+
 2024-10-15  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * m.tmac: Trivially refactor.  Organize groff mm extensions
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index f5d35f9e5..f80c0b18c 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -66,6 +66,7 @@ EXTRA_DIST += \
   contrib/mm/mmroff.pl
 
 mm_TESTS = \
+  contrib/mm/tests/LT-BL-spaces-before-date.sh \
   contrib/mm/tests/LT-SP-AU-without-AT-works.sh \
   contrib/mm/tests/LT-SP-multi-word-LO-SJ-works.sh \
   contrib/mm/tests/LT-should-space-after-inside-address.sh \
diff --git a/contrib/mm/tests/LT-BL-spaces-before-date.sh 
b/contrib/mm/tests/LT-BL-spaces-before-date.sh
new file mode 100755
index 000000000..1ca403be9
--- /dev/null
+++ b/contrib/mm/tests/LT-BL-spaces-before-date.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"
+
+# Regression-test Savannah #66380.
+#
+# Blocked letters should put a blank line before the date.
+
+input='.
+.WA
+123 Main Street
+Anytown, ST  10101
+.WE
+.ND "26 October 2024"
+.IA
+456 Elsewhere Avenue
+Nirvana, PA  20406
+.IE
+.LT
+.P
+We have a research leak!
+The next person I catch embedding engineering samples of our Lightspeed
+Overdrive 2048-core processors in cork coasters distributed at trade
+shows is going to regret it.
+.FC
+.SG
+.NS
+sundry careless people
+.NE
+.'
+
+output=$(echo "$input" | "$groff" -m m -T ascii -P -cbou)
+echo "$output"
+
+echo "$output" | sed -n 15p | grep -q '26 October 2024'
+
+# vim:set ai et sw=4 ts=4 tw=72:



reply via email to

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