gbranden pushed a commit to branch master
in repository groff.

commit 2a145a357c847baff20f67970ad579fb9086ab1c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 10 11:25:11 2026 -0500

    [tbl]: Improve test script. (1/2)
    
    * src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh:
      Revise test to stop using the presence of a "core" file as a failure
      oracle.  Instead, pattern-match tbl(1)'s output for the `TE` macro
      call that gets issed only after the formerly buggy table processing
      completes successfully.
    
    Continues fixing <https://savannah.gnu.org/bugs/?68204>.
    
    Also modernize shell style to align with more recent groff tests.
---
 ChangeLog                                               | 11 +++++++++++
 .../tests/do-not-segv-on-invalid-vertical-span-entry.sh | 17 ++++++-----------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a7adc1cd..3bca60ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-06-10  G. Branden Robinson <[email protected]>
+
+       * src/preproc/tbl/tests/\
+       do-not-segv-on-invalid-vertical-span-entry.sh: Revise test to
+       stop using the presence of a "core" file as a failure oracle.
+       Instead, pattern-match tbl(1)'s output for the `TE` macro call
+       that gets issed only after the formerly buggy table processing
+       completes successfully.
+
+       Continues fixing <https://savannah.gnu.org/bugs/?68204>.
+
 2026-06-10  G. Branden Robinson <[email protected]>
 
        * src/preproc/pic/tests/\
diff --git 
a/src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh 
b/src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh
index 41565c77a..d694fa1a0 100755
--- a/src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh
+++ b/src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh
@@ -25,21 +25,16 @@ tbl="${abs_top_builddir:-.}/tbl"
 # Don't segfault because we tried to span down from an invalid span that
 # tbl neglected to replace with an empty table entry.
 
-if [ -e core ]
-then
-    echo "$0: 'core' file already exists; skipping" >&2
-    exit 77 # skip
-fi
-
-input=$(cat <<EOF
+input='.
 .TS
 l.
 \^
 \^
 .TE
-EOF
-)
-output=$(printf "%s" "$input" | "$tbl")
-! test -f core
+.'
+
+output=$(printf '%s\n' "$input" | "$tbl")
+printf '%s\n' "$output"
+printf '%s\n' "$output" | grep -Fqx ".TE"
 
 # 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