gbranden pushed a commit to branch master in repository groff. commit df4921d075256daf1782a817aaa61e7863f112c5 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Wed May 19 20:32:53 2021 +1000
tmac/tests/an-old_X-register-works.sh: Rewrite. * tmac/tests/an-old_X-register-works.sh: Rewrite. Increase test coverage and stop assuming that -rcR=1 and -rX=anything is a supported combination. (Continuous rendering is supposed to suppress the printing of page numbers anyway.) --- ChangeLog | 7 +++++++ tmac/tests/an-old_X-register-works.sh | 31 ++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82cbde6..65769e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2021-05-19 G. Branden Robinson <g.branden.robin...@gmail.com> + * tmac/tests/an-old_X-register-works.sh: Rewrite. Increase test + coverage and stop assuming that -rcR=1 and -rX=anything is a + supported combination. (Continuous rendering is supposed to + suppress the printing of page numbers anyway.) + +2021-05-19 G. Branden Robinson <g.branden.robin...@gmail.com> + * tmac/an-old.tmac (initialization): Refactor handling of P and X rendering parameter register validation in preparation for disabling them in continuous rendering mode, where they don't diff --git a/tmac/tests/an-old_X-register-works.sh b/tmac/tests/an-old_X-register-works.sh index d89fe7d..e4f0ab3 100755 --- a/tmac/tests/an-old_X-register-works.sh +++ b/tmac/tests/an-old_X-register-works.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2020 Free Software Foundation, Inc. +# Copyright (C) 2020-2021 Free Software Foundation, Inc. # # This file is part of groff. # @@ -20,12 +20,29 @@ groff="${abs_top_builddir:-.}/test-groff" -# Regression-test Savannah #59179. -# -# Don't lose track of the page number if we're continuously rendering -# _and_ we've been given a page-letter suffixing threshold. +# Ensure the X register takes effect on the right page and looks right. + +INPUT='.TH foo 1 2021-05-19 "groff foo test suite" +.TH bar 1 2021-05-19 "groff bar test suite"' + +OUTPUT=$(printf "%s\n" "$INPUT" \ + | "$groff" -Tascii -P-cbou -rcR=0 -rC1 -rX1 -man) +FAIL= + +#echo "$OUTPUT" + +if ! echo "$OUTPUT" | grep -Eqx 'groff foo test suite +2021-05-19 +1' +then + FAIL=yes + echo "first page footer test failed" >&2 +fi + +if ! echo "$OUTPUT" | grep -Eqx 'groff bar test suite +2021-05-19 +1a' +then + FAIL=yes + echo "second page footer test failed" >&2 +fi -printf ".TH foo 1\n" | "$groff" -Tascii -P-cbou -rX1 -man \ - | tail -n 1 | grep -Eq '^[[:space:]]+1$' +test -z "$FAIL" # vim:set ai et sw=4 ts=4 tw=72: _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit