groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/23: [mdoc]: Regression-test Savannah #59738.


From: G. Branden Robinson
Subject: [groff] 15/23: [mdoc]: Regression-test Savannah #59738.
Date: Fri, 16 Sep 2022 13:07:42 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 054d16243aba8e88501b51e709c6a81ba2cb0ee7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Sep 15 12:17:30 2022 -0500

    [mdoc]: Regression-test Savannah #59738.
    
    * tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 +++++
 .../doc_Lk-respect-sentence-ending-punctuation.sh  | 40 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 49 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 11f99101c..9a5131eae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-09-15  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [mdoc]: Regression-test Savannah #59738.
+
+       * tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh: Do
+       it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2022-09-15  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [mdoc]: Fix code style nit.  Rename `doc-arg-limit` to
diff --git a/tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh 
b/tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh
new file mode 100755
index 000000000..7f2cc22ba
--- /dev/null
+++ b/tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 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 #59738.  The processing of arguments after
+# the link text should not break end-of-sentence detection.
+
+input='.Dd 2022-09-15
+.Dt foo 1
+.Os "groff test suite"
+.Sh Name
+.Nm foo
+.Nd frobnicate a bar
+.Sh Description
+Click
+.Lk http://example.com here .
+Follow instructions.'
+
+output=$(echo "$input" | "$groff" -Tascii -P-cbou -mdoc)
+echo "$output" | grep -Fq 'com.  Follow' # 2 spaces
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 9847ded62..ceaa7e428 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -182,6 +182,7 @@ tmac_TESTS = \
   tmac/tests/doc_CS-works.sh \
   tmac/tests/doc_CT-works.sh \
   tmac/tests/doc_D-places-page-numbers-correctly.sh \
+  tmac/tests/doc_Lk-respect-sentence-ending-punctuation.sh \
   tmac/tests/doc_Mt-works.sh \
   tmac/tests/doc_accept-mixed-case-section-headings.sh \
   tmac/tests/doc_do-not-loop-infinitely-when-shortening-headers.sh \



reply via email to

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