gbranden pushed a commit to branch master
in repository groff.

commit 765d6cf03cdeb667627c3644bdd74e3b2afbddb9
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Sep 11 01:05:04 2026 -0500

    [refer]: Regression-test Savannah #68681.
    
    * src/preproc/refer/tests/check-index-file-validity.sh: Do it.
---
 ChangeLog                                            |  6 ++++++
 src/preproc/refer/tests/check-index-file-validity.sh | 16 ++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a88eb50e3..691707129 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-09-11  G. Branden Robinson <[email protected]>
+
+       [refer]: Regression-test Savannah #68681.
+
+       * src/preproc/refer/tests/check-index-file-validity.sh: Do it.
+
 2026-09-10  G. Branden Robinson <[email protected]>
 
        * src/libs/libbib/index.cpp (index_search_item::check_header):
diff --git a/src/preproc/refer/tests/check-index-file-validity.sh 
b/src/preproc/refer/tests/check-index-file-validity.sh
index fb20058df..4c452abfc 100755
--- a/src/preproc/refer/tests/check-index-file-validity.sh
+++ b/src/preproc/refer/tests/check-index-file-validity.sh
@@ -90,6 +90,22 @@ printf '\377\377\377\377' | dd of="$REFER".i bs=1 seek=24 
conv=notrunc
 echo "checking behavior when index file parameters corrupt" >&2
 "$lkbib" Schemer 2>&1 > /dev/null | grep -q 'error.*corrupt' || wail
 
+# Regression-test Savannah #68681.
+
+REFER="$sandbox_dir"/string-pool-test.bib
+echo '%A Test' > "$REFER"
+
+if ! "$indxbib" -c "$common_words_file" "$REFER"
+then
+    echo "cannot generate index for bibliography file; skipping" >&2
+    exit 77 # skip
+fi
+
+# Corrupt the beginning of the string pool.  Thanks to Pavol Sloboda.
+printf '\0' | dd of="$REFER".i bs=1 seek=4044 conv=notrunc
+echo "checking behavior when index file string pool corrupt" >&2
+"$lkbib" Test 2>&1 > /dev/null | grep -q 'error.*corrupt string' || 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

Reply via email to