gbranden pushed a commit to branch master
in repository groff.
commit e53f31d6f36ae0f29d154bfe2a917ab5a8b4c0c4
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Mar 20 20:51:47 2026 -0500
[groff]: Fix code style nits in test.
* src/roff/groff/tests/ab-request-works.sh: Conform better to modern
groff test conventions.
---
ChangeLog | 5 +++++
src/roff/groff/tests/ab-request-works.sh | 31 ++++++++++++++++++++-----------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 65f2eef53..24c0b3f0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-03-20 G. Branden Robinson <[email protected]>
+
+ * src/roff/groff/tests/ab-request-works.sh: Conform better to
+ modern groff test conventions.
+
2026-03-20 G. Branden Robinson <[email protected]>
Skip more tests on buggy Solaris.
diff --git a/src/roff/groff/tests/ab-request-works.sh
b/src/roff/groff/tests/ab-request-works.sh
index 17ce262b4..dd011f549 100755
--- a/src/roff/groff/tests/ab-request-works.sh
+++ b/src/roff/groff/tests/ab-request-works.sh
@@ -19,6 +19,13 @@
groff="${abs_top_builddir:-.}/test-groff"
+fail=
+
+wail () {
+ echo "...FAILED"
+ fail=yes
+}
+
# Verify exit status and regression-test Savannah #60782.
#
# We don't test the X11 devices because groff launches an X client,
@@ -35,18 +42,20 @@ fi
for d in ascii dvi html latin1 lbp lj4 pdf ps utf8
do
- echo "verifying exit status of .ab request using $d device" >&2
- printf '.ab\n' | "$groff" -Z -T$d
- # 4 = (1 << 2)
- test $? -eq 4 || exit 1
+ echo "verifying exit status of 'ab' request using $d device" >&2
+ printf '.ab\n' | "$groff" -Z -T$d
+ # 4 = (1 << 2)
+ test $? -eq 4 || wail
done
-echo "verifying empty output of .ab request with no arguments" >&2
-OUT=$(printf '.ab\n' | "$groff" -Z -Tascii 2>&1)
-test "$OUT" = "" || exit 1
+echo "verifying empty output of 'ab' request with no arguments" >&2
+output=$(printf '.ab\n' | "$groff" -Z -Tascii 2>&1)
+test "$output" = "" || wail
+
+echo "verifying that arguments to 'ab' request go to stderr" >&2
+output=$(printf '.ab foo\n' | "$groff" -Z -Tascii 2>&1 > /dev/null)
+test "$output" = "foo" || wail
-echo "verifying that arguments to .ab request go to stderr" >&2
-OUT=$(printf '.ab foo\n' | "$groff" -Z -Tascii 2>&1 > /dev/null)
-test "$OUT" = "foo" || exit 1
+test -z "$fail"
-# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit