gbranden pushed a commit to branch master
in repository groff.
commit 34049cddce28d23f2149206fdb679b71ba210ad5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jul 10 12:05:15 2025 -0500
[grn,soelim,tbl]: Add tests.
...verifying pass-through of 8-bit input.
* src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh: Add
test.
* src/preproc/grn/grn.am (grn_TESTS): Run test.
(TESTS): Add test to suite.
(EXTRA_DIST): Ship test in distribution archive.
* src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh:
Add test.
* src/preproc/soelim/soelim.am (soelim_TESTS): Run test.
* src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh: Add
test.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
---
ChangeLog | 19 +++++++++++++
src/preproc/grn/grn.am | 6 ++++-
.../passes-through-input-with-eighth-bit-set.sh | 31 ++++++++++++++++++++++
src/preproc/soelim/soelim.am | 5 ++--
.../passes-through-input-with-eighth-bit-set.sh | 30 +++++++++++++++++++++
src/preproc/tbl/tbl.am | 2 +-
.../passes-through-input-with-eighth-bit-set.sh | 30 +++++++++++++++++++++
7 files changed, 119 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 43d13e968..3be1d09e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2025-07-10 G. Branden Robinson <[email protected]>
+
+ * [grn,soelim,tbl]: Add tests verifying pass-through of 8-bit
+ input.
+
+ * src/preproc/grn/tests/\
+ passes-through-input-with-eighth-bit-set.sh: Add test.
+ * src/preproc/grn/grn.am (grn_TESTS): Run test.
+ (TESTS): Add test to suite.
+ (EXTRA_DIST): Ship test in distribution archive.
+
+ * src/preproc/soelim/tests/\
+ passes-through-input-with-eighth-bit-set.sh: Add test.
+ * src/preproc/soelim/soelim.am (soelim_TESTS): Run test.
+
+ * src/preproc/tbl/tests/\
+ passes-through-input-with-eighth-bit-set.sh: Add test.
+ * src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
+
2025-07-10 G. Branden Robinson <[email protected]>
* src/preproc/soelim/soelim.am (soelim_TESTS): Actually run the
diff --git a/src/preproc/grn/grn.am b/src/preproc/grn/grn.am
index f45fa24e0..b7f1c9efe 100644
--- a/src/preproc/grn/grn.am
+++ b/src/preproc/grn/grn.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -27,6 +27,10 @@ grn_LDADD = libgroff.a lib/libgnu.a $(LIBM)
PREFIXMAN1 += src/preproc/grn/grn.1
EXTRA_DIST += src/preproc/grn/README src/preproc/grn/grn.1.man
+grn_TESTS = \
+ src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh
+TESTS += $(grn_TESTS)
+EXTRA_DIST += $(grn_TESTS)
# Local Variables:
# fill-column: 72
diff --git a/src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh
b/src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh
new file mode 100755
index 000000000..3be20925c
--- /dev/null
+++ b/src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 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/>.
+#
+
+grn="${abs_top_builddir:-.}/grn"
+fontdir="${abs_top_builddir:-.}/font"
+
+# grn should not strip "invalid" characters from parts of a document it
+# does not interpret.
+
+output=$(printf '.\\" degree sign: \313\232\n' | "$grn" -F "$fontdir")
+printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c | grep -q ' 232'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/src/preproc/soelim/soelim.am b/src/preproc/soelim/soelim.am
index a016f2f6a..c53614d4e 100644
--- a/src/preproc/soelim/soelim.am
+++ b/src/preproc/soelim/soelim.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -24,7 +24,8 @@ EXTRA_DIST += \
src/preproc/soelim/soelim.1.man
soelim_TESTS = \
- src/preproc/soelim/tests/space-in-argument-works.sh
+ src/preproc/soelim/tests/space-in-argument-works.sh \
+ src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh
TESTS += $(soelim_TESTS)
EXTRA_DIST += $(soelim_TESTS)
diff --git
a/src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh
b/src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh
new file mode 100755
index 000000000..b651e813b
--- /dev/null
+++ b/src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 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/>.
+#
+
+soelim="${abs_top_builddir:-.}/soelim"
+
+# soelim should not strip "invalid" characters from parts of a document
+# it does not interpret.
+
+output=$(printf '.\\" degree sign: \313\232\n' | "$soelim")
+printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c | grep -q ' 232'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index af7ecedaa..8113327a7 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -40,6 +40,7 @@ tbl_TESTS = \
src/preproc/tbl/tests/expand-region-option-works.sh \
src/preproc/tbl/tests/format-time-diagnostics-work.sh \
src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh \
+ src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh \
src/preproc/tbl/tests/repeated-character-entry-works.sh \
src/preproc/tbl/tests/save-and-restore-hyphenation-parameters.sh \
src/preproc/tbl/tests/save-and-restore-inter-sentence-space.sh \
@@ -50,7 +51,6 @@ tbl_TESTS = \
TESTS += $(tbl_TESTS)
EXTRA_DIST += $(tbl_TESTS)
-
# Local Variables:
# fill-column: 72
# mode: makefile-automake
diff --git a/src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh
b/src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh
new file mode 100755
index 000000000..1e017e324
--- /dev/null
+++ b/src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 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/>.
+#
+
+tbl="${abs_top_builddir:-.}/tbl"
+
+# tbl should not strip "invalid" characters from parts of a document it
+# does not interpret.
+
+output=$(printf '.\\" degree sign: \313\232\n' | "$tbl")
+printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c | grep -q ' 232'
+
+# vim:set ai et sw=4 ts=4 tw=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit