gbranden pushed a commit to branch master
in repository groff.
commit 0b5819209ac7bffe74919fac16701cc1f24778b9
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jul 24 17:37:13 2026 -0500
[grops]: Regression-test Savannah #68559.
* src/devices/grops/tests/device-extension-command-import-works.sh: Do
it.
* src/devices/grops/grops.am (grops_TESTS): Run test.
(TESTS, EXTRA_DIST): Wire `grops_TESTS` into Automake test harness and
ship this and any future grops test scripts.
Test fails at this commit.
---
ChangeLog | 10 +++
src/devices/grops/grops.am | 5 ++
.../tests/device-extension-command-import-works.sh | 74 ++++++++++++++++++++++
3 files changed, 89 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a6745c231..171fc7ef5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-07-24 G. Branden Robinson <[email protected]>
+
+ [grops]: Regression-test Savannah #68559.
+
+ * src/devices/grops/tests/\
+ device-extension-command-import-works.sh: Do it.
+ * src/devices/grops/grops.am (grops_TESTS): Run test.
+ (TESTS, EXTRA_DIST): Wire `grops_TESTS` into Automake test
+ harness and ship this and any future grops test scripts.
+
2026-07-24 G. Branden Robinson <[email protected]>
* src/roff/troff/env.cpp (print_hyphenation_exceptions_request):
diff --git a/src/devices/grops/grops.am b/src/devices/grops/grops.am
index eb7eb96f6..47558a9f6 100644
--- a/src/devices/grops/grops.am
+++ b/src/devices/grops/grops.am
@@ -45,6 +45,11 @@ uninstall_groffdirs: uninstall_grops_hook
uninstall_grops_hook:
-rmdir $(DESTDIR)$(tmacdir)
+grops_TESTS = \
+ src/devices/grops/tests/device-extension-command-import-works.sh
+TESTS += $(grops_TESTS)
+EXTRA_DIST += $(grops_TESTS)
+
# Local Variables:
# fill-column: 72
# mode: makefile-automake
diff --git a/src/devices/grops/tests/device-extension-command-import-works.sh
b/src/devices/grops/tests/device-extension-command-import-works.sh
new file mode 100755
index 000000000..278a1736c
--- /dev/null
+++ b/src/devices/grops/tests/device-extension-command-import-works.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# Copyright 2026 G. Branden Robinson
+#
+# This file is part of groff, the GNU roff typesetting system.
+#
+# 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/>.
+
+grops="${abs_top_builddir:-.}/grops"
+srcdir="${abs_top_srcdir:-..}"
+
+# Unit-test `ps: import` device extension command.
+
+# Locate directory containing our test artifacts.
+artifact_dir=
+
+for buildroot in . .. ../..
+do
+ d=$buildroot/doc
+ if [ -f $d/gnu.eps ]
+ then
+ artifact_dir=$d
+ gnu_eps=$artifact_dir/gnu.eps
+ break
+ fi
+done
+
+# If we can't find it, we can't test.
+if [ -z "$artifact_dir" ]
+then
+ echo "$0: cannot locate test artifact directory; skipping" >&2
+ exit 77 # skip
+fi
+
+input="#
+x T ps
+x res 72000 1 1
+x init
+p 1
+D F d
+V 84000
+H 72000
+x font 5 TR
+f 5
+s 10000
+m d
+V 384000
+H 72000
+x X ps: import $gnu_eps 203 311 408 481 144000 119415
+x X ps: import $gnu_eps a 203b 311c 408d 481e 144000f 119415g
+x X ps: import $gnu_eps 203a
+x trailer
+V 792000
+x stop
+#"
+
+echo "checking that 'ps: import' device extension command works" >&2
+output=$(printf '%s\n' "$input" \
+ | "$grops" -F font -F "$srcdir"/font)
+echo "$output"
+echo "$output" | grep -qx "colorimage"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit