gbranden pushed a commit to branch master
in repository groff.
commit 9fe57ef7bed67e8aba9a2f1e63c0e2634d882d00
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Sep 3 12:09:11 2024 -0500
[groff]: Test `pi` and `sy` requests.
Add tests to prevent recurrence of Savannah #66164.
* src/roff/groff/tests/pi-request-works.sh:
* src/roff/groff/tests/sy-request-works.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run tests.
Continues fixing <https://savannah.gnu.org/bugs/?66164>. (We still need
a regression test for the `sizes` request, but there is no
straightforward means of introspecting that aspect of environment state
at present.)
---
ChangeLog | 14 ++++++++++++++
src/roff/groff/groff.am | 2 ++
src/roff/groff/tests/pi-request-works.sh | 28 ++++++++++++++++++++++++++++
src/roff/groff/tests/sy-request-works.sh | 28 ++++++++++++++++++++++++++++
4 files changed, 72 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 38df83a52..e2af9e972 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-09-03 G. Branden Robinson <[email protected]>
+
+ Add tests to prevent recurrence of Savannah #66164.
+
+ * src/roff/groff/tests/pi-request-works.sh:
+ * src/roff/groff/tests/sy-request-works.sh: Do it.
+
+ * src/roff/groff/groff.am (groff_TESTS): Run tests.
+
+ Continues fixing <https://savannah.gnu.org/bugs/?66164>. (We
+ still need a regression test for the `sizes` request, but there
+ is no straightforward means of introspecting that aspect of
+ environment state at present.)
+
2024-09-03 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (pipe_output, system_request): Fix
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 40ab5e8b2..7cf6944e5 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -78,6 +78,7 @@ groff_TESTS = \
src/roff/groff/tests/localization-works.sh \
src/roff/groff/tests/msoquiet-request-works.sh \
src/roff/groff/tests/output-request-works.sh \
+ src/roff/groff/tests/pi-request-works.sh \
src/roff/groff/tests/recognize-end-of-sentence.sh \
src/roff/groff/tests/regression_savannah_56555.sh \
src/roff/groff/tests/regression_savannah_58153.sh \
@@ -90,6 +91,7 @@ groff_TESTS = \
src/roff/groff/tests/stringdown-request-rejects-request-names.sh \
src/roff/groff/tests/stringup-request-transforms-non-basic-latin.sh \
src/roff/groff/tests/substring-request-works.sh \
+ src/roff/groff/tests/sy-request-works.sh \
src/roff/groff/tests/unencodable-things-in-grout.sh
TESTS += $(groff_TESTS)
EXTRA_DIST += $(groff_TESTS)
diff --git a/src/roff/groff/tests/pi-request-works.sh
b/src/roff/groff/tests/pi-request-works.sh
new file mode 100755
index 000000000..2a589698d
--- /dev/null
+++ b/src/roff/groff/tests/pi-request-works.sh
@@ -0,0 +1,28 @@
+#!/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"
+
+echo "checking that 'pi' request works" >&2
+output=$(printf '.pi sed s/^/#/\nhello\n' | "$groff" -UZ)
+echo "$output"
+echo "$output" | grep -Eqx '^#t *hello'
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
diff --git a/src/roff/groff/tests/sy-request-works.sh
b/src/roff/groff/tests/sy-request-works.sh
new file mode 100755
index 000000000..a4caebfe1
--- /dev/null
+++ b/src/roff/groff/tests/sy-request-works.sh
@@ -0,0 +1,28 @@
+#!/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"
+
+echo "checking that 'sy' request works" >&2
+output=$(printf '.sy echo hello\n' | "$groff" -Uz)
+echo $output
+echo $output | grep -Fqx hello
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit