gbranden pushed a commit to branch master
in repository groff.
commit a5667ad703ecac9212577e80d06e3b7f9d24e7fb
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 17 21:10:30 2026 -0500
[refer]: Regression-test Savannah #68685.
* src/preproc/refer/tests/check-index-file-validity.sh: Do it.
Test fails at this commit.
---
ChangeLog | 6 ++++++
.../refer/tests/check-index-file-validity.sh | 22 ++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 771bd87bb..a62138782 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-09-17 G. Branden Robinson <[email protected]>
+
+ [refer]: Regression-test Savannah #68685.
+
+ * src/preproc/refer/tests/check-index-file-validity.sh: Do it.
+
2026-09-17 G. Branden Robinson <[email protected]>
* src/libs/libbib/index.cpp
diff --git a/src/preproc/refer/tests/check-index-file-validity.sh
b/src/preproc/refer/tests/check-index-file-validity.sh
index c601173fc..779914d6a 100755
--- a/src/preproc/refer/tests/check-index-file-validity.sh
+++ b/src/preproc/refer/tests/check-index-file-validity.sh
@@ -128,6 +128,28 @@ echo "checking behavior when index file name index number
corrupt" >&2
"$lkbib" Test 2>&1 > /dev/null | grep -q 'invalid.*file name index' \
|| wail
+# Regression-test Savannah #68685.
+
+REFER="$sandbox_dir"/common-words-index.bib
+cp "$artifact_dir/little-schemer.bib" "$REFER"
+
+if ! "$indxbib" -c "$common_words_file" "$REFER"
+then
+ echo "cannot generate index for bibliography file; skipping" >&2
+ exit 77 # skip
+fi
+
+# Corrupt the bibliography file's count of common words. Thanks to
+# Pavol Sloboda.
+#
+# dash's built-in printf doesn't support \x or \u escapes, so likely
+# other shells don't either, and expecting one that does to be in the
+# $PATH seems optimistic.
+printf '\377\377\377?' | dd of="$REFER".i bs=1 seek=32 conv=notrunc
+echo "checking behavior when common word list size is bogus" >&2
+"$lkbib" Test 2>&1 > /dev/null | grep -q 'implausible count.*common' \
+ || wail
+
# We need `-f` because "little-schemer.bib" gets mode 444 in a "make
# distcheck" build.
rm -rf "$sandbox_dir"
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit