gbranden pushed a commit to branch master
in repository groff.
commit 962b34345679145c880bc9784778ca7cc25212de
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 10 11:09:26 2026 -0500
[pic]: Improve test script.
* src/preproc/pic/tests/do-not-crash-when-reading-macro-arguments.sh:
Revise test to stop using the presence of a "core" file as a failure
oracle. Instead, pattern-match pic(1)'s output for the `PE` *roff
macro call that gets issed only after the formerly buggy macro
processing completes successfully.
Begins fixing <https://savannah.gnu.org/bugs/?68204>.
Also modernize shell style to align with more recent groff tests.
---
ChangeLog | 11 +++++++++++
.../pic/tests/do-not-crash-when-reading-macro-arguments.sh | 12 +++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 911216050..0a7adc1cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-06-10 G. Branden Robinson <[email protected]>
+
+ * src/preproc/pic/tests/\
+ do-not-crash-when-reading-macro-arguments.sh: Revise test to
+ stop using the presence of a "core" file as a failure oracle.
+ Instead, pattern-match pic(1)'s output for the `PE` *roff macro
+ call that gets issed only after the formerly buggy macro
+ processing completes successfully.
+
+ Begins fixing <https://savannah.gnu.org/bugs/?68204>.
+
2026-06-07 G. Branden Robinson <[email protected]>
* src/roff/groff/tests/count-macro-arguments-correctly.sh: Add
diff --git a/src/preproc/pic/tests/do-not-crash-when-reading-macro-arguments.sh
b/src/preproc/pic/tests/do-not-crash-when-reading-macro-arguments.sh
index d0edad343..7134ef65a 100755
--- a/src/preproc/pic/tests/do-not-crash-when-reading-macro-arguments.sh
+++ b/src/preproc/pic/tests/do-not-crash-when-reading-macro-arguments.sh
@@ -22,13 +22,6 @@ pic="${abs_top_builddir:-.}/pic"
# Regression-test Savannah #67899. Thanks to John de Armas for the
# reproducer (based on an example from "doc/pic.ms").
-if [ -e core ]
-then
- echo "$0: 'core' file already exists; skipping" >&2
- exit 77 # skip
-fi
-
-
input='
.PS
# Plot a single jumper in a $1 by $2 box, $3 is the on-off state
@@ -72,7 +65,8 @@
jumperblock(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,\
.PE
'
-echo "$input" | "$pic"
-! test -f core
+output=$(printf '%s\n' "$input" | "$pic")
+printf '%s\n' "$output"
+printf '%s\n' "$output" | grep -Fqx '.PE'
# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit