gbranden pushed a commit to branch master in repository groff. commit a091b588bc7ec4ec709de0cf003cb2888a29e591 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Jun 26 01:23:43 2025 -0500
[pfbtops]: Add test for `pfbtops` command. * src/util/pfbtops/tests/smoke-test.sh: Do it. * src/util/pfbtops/pfbtops.am (pfbtops_TESTS): Run test. (TESTS): Add test to suite. (EXTRA_DIST): Ship test in distribution archive. --- ChangeLog | 9 +++++++++ src/utils/pfbtops/pfbtops.am | 6 +++++- src/utils/pfbtops/tests/smoke-test.sh | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b703bdbc..70b37697a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2025-06-26 G. Branden Robinson <g.branden.robin...@gmail.com> + + [pfbtops]: Add test for `pfbtops` command. + + * src/util/pfbtops/tests/smoke-test.sh: Do it. + * src/util/pfbtops/pfbtops.am (pfbtops_TESTS): Run test. + (TESTS): Add test to suite. + (EXTRA_DIST): Ship test in distribution archive. + 2025-06-28 G. Branden Robinson <g.branden.robin...@gmail.com> * src/utils/grog/grog.pl (interpet_line): Recognize new `pfp` diff --git a/src/utils/pfbtops/pfbtops.am b/src/utils/pfbtops/pfbtops.am index 8b7fd71c4..98226abb2 100644 --- a/src/utils/pfbtops/pfbtops.am +++ b/src/utils/pfbtops/pfbtops.am @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2020 Free Software Foundation, Inc. +# Copyright (C) 2014-2025 Free Software Foundation, Inc. # # This file is part of groff. # @@ -24,6 +24,10 @@ pfbtops_LDADD = libgroff.a $(LIBM) lib/libgnu.a # See the Automake manual, "Libtool Convenience Libraries" nodist_EXTRA_pfbtops_SOURCES = src/utils/pfbtops/dummy.cpp +pfbtops_TESTS = \ + src/utils/pfbtops/tests/smoke-test.sh +TESTS += $(pfbtops_TESTS) +EXTRA_DIST += $(pfbtops_TESTS) # Local Variables: # fill-column: 72 diff --git a/src/utils/pfbtops/tests/smoke-test.sh b/src/utils/pfbtops/tests/smoke-test.sh new file mode 100755 index 000000000..a578840af --- /dev/null +++ b/src/utils/pfbtops/tests/smoke-test.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Copyright (C) 2025 Free Software Foundation, Inc. +# +# This file is part of groff. +# +# groff is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# groff is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +pfbtops="${abs_top_builddir:-.}/pfbtops" +pfbfont="${abs_top_builddir:-.}/font/devpdf/StandardSymSL.pfb" + +# Smoke-test pfbtops command. + +output=$("$pfbtops" < "$pfbfont") +if [ $? -ne 0 ] +then + echo "$pfbtops" exited with status $? + exit 1 +fi + +printf "%s\n" "$output" +printf "%s\n" "$output" | grep -Fqx cleartomark + +# 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