gbranden pushed a commit to branch master
in repository groff.

commit fa60c1857d1461fb8cef9ffd3fc8da58a67cd8f9
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Sun Jul 6 06:01:54 2025 -0500

    [eqn]: Regression-test Savannah #67285.
    
    * src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh: Do
      it.
    * src/preproc/eqn/eqn.am (eqn_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 ++++++
 src/preproc/eqn/eqn.am                             |  3 ++-
 .../passes-through-input-with-eighth-bit-set.sh    | 29 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9ef82683a..ffbfe7b55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-07-06  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       [eqn]: Regression-test Savannah #67285.
+
+       * src/preproc/eqn/tests/\
+       passes-through-input-with-eighth-bit-set.sh: Do it.
+       * src/preproc/eqn/eqn.am (eqn_TESTS): Run test.
+
 2025-07-06  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * src/preproc/eqn/main.cpp (main): Actually set
diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
index 3816cba97..8a2fce457 100644
--- a/src/preproc/eqn/eqn.am
+++ b/src/preproc/eqn/eqn.am
@@ -73,7 +73,8 @@ neqn: $(top_srcdir)/src/preproc/eqn/neqn.sh 
$(SH_DEPS_SED_SCRIPT)
 
 eqn_TESTS = \
   src/preproc/eqn/tests/diagnostics-report-correct-line-numbers.sh \
-  src/preproc/eqn/tests/parameters-can-be-set-and-reset.sh
+  src/preproc/eqn/tests/parameters-can-be-set-and-reset.sh \
+  src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh
 TESTS += $(eqn_TESTS)
 EXTRA_DIST += $(eqn_TESTS)
 
diff --git a/src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh 
b/src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh
new file mode 100755
index 000000000..dc53b5082
--- /dev/null
+++ b/src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh
@@ -0,0 +1,29 @@
+#!/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/>.
+#
+
+eqn="${abs_top_builddir:-.}/eqn"
+
+# Regression-test Savannah #67285.  eqn should not strip "invalid"
+# characters from parts of a document it does not interpret.
+
+output=$(printf '.\\" degree sign: \313\232\n' | "$eqn" -R 2>/dev/null)
+printf "%s" "$output" | od -c | grep -q ' 232'
+
+# vim:set ai et sw=4 ts=4 tw=72:


_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to