gbranden pushed a commit to branch master
in repository groff.

commit 3c47d13ec0300eb8572d6b893de10fbdd605cb78
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jan 26 01:14:53 2026 -0600

    src/preproc: Make test scripts more robust.
    
    ...against host's locale-related environment variable defaults.
    
    Also issue the octal-dumped output to the error stream, since otherwise
    problems might be invisible.
---
 src/preproc/eqn/tests/passes-through-input-with-eighth-bit-set.sh    | 4 ++++
 src/preproc/grn/tests/passes-through-input-with-eighth-bit-set.sh    | 4 ++++
 src/preproc/pic/tests/passes-through-input-with-eighth-bit-set.sh    | 4 ++++
 src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh | 4 ++++
 src/preproc/tbl/tests/passes-through-input-with-eighth-bit-set.sh    | 4 ++++
 5 files changed, 20 insertions(+)

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
index 7835bcb41..d0ae9ee56 100755
--- 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
@@ -23,8 +23,12 @@ eqn="${abs_top_builddir:-.}/eqn"
 # Regression-test Savannah #67285.  eqn should not strip "invalid"
 # characters from parts of a document it does not interpret.
 
+LC_ALL=C
+export LC_ALL
+
 output=$(printf '.\\" degree sign: \313\232\n' | "$eqn" -R)
 printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c
 printf "%s\n" "$output" | od -c | grep -q ' 232'
 
 # vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=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
index 7b2505f92..e48264908 100755
--- 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
@@ -24,8 +24,12 @@ fontdir="${abs_top_builddir:-.}/font"
 # grn should not strip "invalid" characters from parts of a document it
 # does not interpret.
 
+LC_ALL=C
+export LC_ALL
+
 output=$(printf '.\\" degree sign: \313\232\n' | "$grn" -F "$fontdir")
 printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c
 printf "%s\n" "$output" | od -c | grep -q ' 232'
 
 # vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/src/preproc/pic/tests/passes-through-input-with-eighth-bit-set.sh 
b/src/preproc/pic/tests/passes-through-input-with-eighth-bit-set.sh
index 06f86e7a1..2d831515d 100755
--- a/src/preproc/pic/tests/passes-through-input-with-eighth-bit-set.sh
+++ b/src/preproc/pic/tests/passes-through-input-with-eighth-bit-set.sh
@@ -23,8 +23,12 @@ pic="${abs_top_builddir:-.}/pic"
 # pic should not strip "invalid" characters from parts of a document it
 # does not interpret.
 
+LC_ALL=C
+export LC_ALL
+
 output=$(printf '.\\" degree sign: \313\232\n' | "$pic")
 printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c
 printf "%s\n" "$output" | od -c | grep -q ' 232'
 
 # vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
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
index 734897077..c75ec6936 100755
--- 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
@@ -23,8 +23,12 @@ soelim="${abs_top_builddir:-.}/soelim"
 # soelim should not strip "invalid" characters from parts of a document
 # it does not interpret.
 
+LC_ALL=C
+export LC_ALL
+
 output=$(printf '.\\" degree sign: \313\232\n' | "$soelim")
 printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c
 printf "%s\n" "$output" | od -c | grep -q ' 232'
 
 # vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
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
index d8dfb6dc9..aea9207c3 100755
--- 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
@@ -23,8 +23,12 @@ tbl="${abs_top_builddir:-.}/tbl"
 # tbl should not strip "invalid" characters from parts of a document it
 # does not interpret.
 
+LC_ALL=C
+export LC_ALL
+
 output=$(printf '.\\" degree sign: \313\232\n' | "$tbl")
 printf "%s\n" "$output"
+printf "%s\n" "$output" | od -c
 printf "%s\n" "$output" | od -c | grep -q ' 232'
 
 # vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to