gbranden pushed a commit to branch master
in repository groff.
commit e6a42837c0f09ebeb3f39c1c67d042279354ed90
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 21 19:42:20 2026 -0500
tmac/tests/an_P-register-works.sh: Update script.
...to modern groff test script conventions.
* Use nl(1) to number output lines.
* Apply a tab-to-space-translating tr(1) command on the test output,
fearing inconsistencies among Unices in how nl(1) prefixes the lines
it filters.
* Drop stump comment after license notice.
* Revise Vim modeline to communicate less esoterically.
---
tmac/tests/an_P-register-works.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tmac/tests/an_P-register-works.sh
b/tmac/tests/an_P-register-works.sh
index d4b686974..ce53173e8 100755
--- a/tmac/tests/an_P-register-works.sh
+++ b/tmac/tests/an_P-register-works.sh
@@ -16,7 +16,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
groff="${abs_top_builddir:-.}/test-groff"
@@ -35,17 +34,17 @@ foo \- frobinicate a bar
It took a while to get here.'
output=$(printf "%s\n" "$input" | "$groff" -rcR=0 -rP13 -man -Tascii \
- -P-cbou)
+ -P-cbou | nl -ba | tr '\t' ' ')
echo "$output"
echo "checking first page footer" >&2
-echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^63:' || wail
+echo "$output" \
+ | grep -E "^ +63 +groff test suite +2022-12-11 +13$" || wail
echo "checking second page footer" >&2
-echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^129:' || wail
+echo "$output" \
+ | grep -E "^ +129 +groff test suite +2022-12-11 +14$" || wail
test -z "$fail"
-# vim:set ai et sw=4 ts=4 tw=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