[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/14: tmac/tests/doc_Mt-works.sh: Test "direct" Mt call.
|
From: |
G. Branden Robinson |
|
Subject: |
[groff] 09/14: tmac/tests/doc_Mt-works.sh: Test "direct" Mt call. |
|
Date: |
Sun, 28 Jan 2024 19:55:03 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit f9d4574e86cad1b7c65f4ca36ccd440ddd3a4232
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jan 28 14:18:37 2024 -0600
tmac/tests/doc_Mt-works.sh: Test "direct" Mt call.
Also:
Migrate to more recent test conventions. Employ the `wail()` function
earlier. Drop use of `set -e`.
---
ChangeLog | 4 ++++
tmac/tests/doc_Mt-works.sh | 22 +++++++++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e6189e71f..3bc7c74d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-01-28 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/tests/doc_Mt-works.sh: Test "direct" `Mt` call.
+
2024-01-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* tmac/an.tmac: Specialize `an*bookmark` macro by output device.
diff --git a/tmac/tests/doc_Mt-works.sh b/tmac/tests/doc_Mt-works.sh
index 18d804849..8a4a78251 100755
--- a/tmac/tests/doc_Mt-works.sh
+++ b/tmac/tests/doc_Mt-works.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2021 Free Software Foundation, Inc.
+# Copyright (C) 2021-2024 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -19,7 +19,12 @@
groff="${abs_top_builddir:-.}/test-groff"
-set -e
+fail=
+
+wail() {
+ echo ...FAILED >&2
+ fail=yes
+}
# Regression-test Savannah #60025.
#
@@ -38,15 +43,22 @@ The
utility was written by
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
and is maintained by
-.An Ingo Schwarze Aq Mt schwarze@openbsd.org .'
+.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
+Certainly
+.Mt bogus@example.com
+had nothing to do with it.'
output=$(echo "$input" | "$groff" -Tascii -P-cbou -mdoc)
echo "$output"
+echo "checking that conventional Mt macro call works" >&2
echo "$output" \
- | grep -Fq 'written by Kristaps Dzonsons <kristaps@bsd.lv>'
+ | grep -Eq '^ +bogus@example\.com' || wail
+echo "checking that inline Mt macro call works" >&2
echo "$output" \
- | grep -Fq 'is maintained by Ingo Schwarze <schwarze@openbsd.org>.'
+ | grep -Fq 'written by Kristaps Dzonsons <kristaps@bsd.lv>' || wail
+
+test -z "$fail"
# vim:set ai et sw=4 ts=4 tw=72:
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/14: tmac/tests/doc_Mt-works.sh: Test "direct" Mt call.,
G. Branden Robinson <=