[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/02: Add test for end-of-sentence recognition.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/02: Add test for end-of-sentence recognition. |
Date: |
Fri, 17 Jan 2020 10:24:37 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 7026dab5367d87fe277c785d0fa405f44817df80
Author: G. Branden Robinson <address@hidden>
AuthorDate: Sat Jan 18 02:20:09 2020 +1100
Add test for end-of-sentence recognition.
* src/roff/groff/tests/transparent_end-of-sentence_chars.sh: Add test.
* src/roff/groff/groff.am: Update list of tests.
---
ChangeLog | 6 +++++
src/roff/groff/groff.am | 3 ++-
.../tests/transparent_end-of-sentence_chars.sh | 31 ++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 4b9dca2..e21b6e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2020-01-18 G. Branden Robinson <address@hidden>
+ * src/roff/groff/tests/transparent_end-of-sentence_chars.sh: Add
+ test for end-of-sentence recognition.
+ * src/roff/groff/groff.am: Update list of tests.
+
+2020-01-18 G. Branden Robinson <address@hidden>
+
* src/roff/troff/input.cpp: Mark \[dd] character (double dagger)
as transparent for purposes of end-of-sentence recognition.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 77487b7..d9c2da9 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -45,7 +45,8 @@ groff_TESTS = \
src/roff/groff/tests/on-latin1-device-oq-is-0x27.sh \
src/roff/groff/tests/string_case_xform_requests.sh \
src/roff/groff/tests/string_case_xform_unicode_escape.sh \
- src/roff/groff/tests/string_case_xform_errors.sh
+ src/roff/groff/tests/string_case_xform_errors.sh \
+ src/roff/groff/tests/transparent_end-of-sentence_chars.sh
TESTS += $(groff_TESTS)
groff_XFAIL_TESTS = \
diff --git a/src/roff/groff/tests/transparent_end-of-sentence_chars.sh
b/src/roff/groff/tests/transparent_end-of-sentence_chars.sh
new file mode 100755
index 0000000..368dc2b
--- /dev/null
+++ b/src/roff/groff/tests/transparent_end-of-sentence_chars.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (C) 2020 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"
+
+# Verify that the characters trailing the period are all transparent for
+# purposes of end-of-sentence recognition. We use UTF-8 so we won't get
+# warnings about \[dg] and \[dd] missing from other encodings.
+
+"$groff" -Tutf8 <<EOF | grep -qE 'Eat\.[^ ]+ Drink\.'
+.pl 1v
+Eat."')]*\[dg]\[dd]\[rq]\[cq]
+Drink.
+EOF
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/02: Add test for end-of-sentence recognition.,
G. Branden Robinson <=