[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/05: Add regression test for Savannah #60189.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/05: Add regression test for Savannah #60189. |
Date: |
Sat, 4 Sep 2021 11:21:47 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit f2d7e3ee22ed281beb0d096a773f995b25269a48
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Sep 4 22:58:07 2021 +1000
Add regression test for Savannah #60189.
* src/roff/groff/tests/break_zero-length_output_line_sanely.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 8 +++++
src/roff/groff/groff.am | 1 +
.../tests/break_zero-length_output_line_sanely.sh | 42 ++++++++++++++++++++++
3 files changed, 51 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 78c3e39..c57e6e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-09-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Add regression test for Savannah #60189.
+
+ * src/roff/groff/tests/break_zero-length_output_line_sanely.sh:
+ Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2021-08-29 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Tweak diagnostic message.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index d39796a..3b99c20 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -37,6 +37,7 @@ EXTRA_DIST += src/roff/groff/groff.1.man
groff_TESTS = \
src/roff/groff/tests/adjustment_works.sh \
+ src/roff/groff/tests/break_zero-length_output_line_sanely.sh \
src/roff/groff/tests/do_not_loop_infinitely_when_breaking_cjk.sh \
src/roff/groff/tests/dot-cp_register_works.sh \
src/roff/groff/tests/dot-nm_register_works.sh \
diff --git a/src/roff/groff/tests/break_zero-length_output_line_sanely.sh
b/src/roff/groff/tests/break_zero-length_output_line_sanely.sh
new file mode 100755
index 0000000..5266362
--- /dev/null
+++ b/src/roff/groff/tests/break_zero-length_output_line_sanely.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 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"
+
+set -e
+
+# Do not core dump when attempting to distribute a space amount of zero
+# if someone sets the line length to zero. See Savannah #61089.
+# Reproducer courtesy of John Gardner.
+
+INPUT='.de _
+. na
+. nh
+. ll 0
+. di A
+\\&\\\\$1
+. di
+. br
+..
+._ " XYZ"
+.A'
+
+OUTPUT=$(echo "$INPUT" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx XYZ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/05: Add regression test for Savannah #60189.,
G. Branden Robinson <=