gbranden pushed a commit to branch master
in repository groff.
commit 80a6fbc7fd3a50a841cfb2b7b3b740489c44fb43
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Dec 20 20:28:29 2025 -0600
[groff]: Add smoke test for "lj4" device.
* src/roff/groff/tests/lj4-device-smoke-test.sh: New file.
* src/roff/groff/groff.am (groff_TESTS): Run test.
---
ChangeLog | 5 ++++
src/roff/groff/groff.am | 1 +
src/roff/groff/tests/lj4-device-smoke-test.sh | 34 +++++++++++++++++++++++++++
3 files changed, 40 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 061aadeab..771ddaccc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-12-20 G. Branden Robinson <[email protected]>
+
+ * src/roff/groff/tests/lj4-device-smoke-test.sh: New file.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2025-12-20 G. Branden Robinson <[email protected]>
* src/roff/groff/tests/lbp-device-smoke-test.sh: New file.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index b73b99342..0bf6f42cf 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -96,6 +96,7 @@ groff_TESTS = \
src/roff/groff/tests/latin1-device-maps-oq-to-0x27.sh \
src/roff/groff/tests/lbp-device-smoke-test.sh \
src/roff/groff/tests/lf-request-works.sh \
+ src/roff/groff/tests/lj4-device-smoke-test.sh \
src/roff/groff/tests/logical-predicates-work.sh \
src/roff/groff/tests/localization-works.sh \
src/roff/groff/tests/msoquiet-request-works.sh \
diff --git a/src/roff/groff/tests/lj4-device-smoke-test.sh
b/src/roff/groff/tests/lj4-device-smoke-test.sh
new file mode 100755
index 000000000..f7b6c32bc
--- /dev/null
+++ b/src/roff/groff/tests/lj4-device-smoke-test.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Copyright 2025 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/>.
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Expected output:
+#0000060 0 V esc * p 9 0 0 x 2 0 0 Y H e l
+#0000100 l o esc * p - 9 X , esc * p + 4 9 X
+#0000120 w esc * p - 9 X o r l d ! ff esc E
+
+output=$(echo "Hello, world!" | "$groff" -T lj4 | od -t a)
+echo "$output" | grep '^0000060'
+echo "$output" | grep '^00001[02]0'
+echo "$output" | grep -Eq '^0000060.*H +e +l' || exit 1
+echo "$output" | grep -Eq '^0000100.*l +o.* +,' || exit 1
+echo "$output" | grep -Eq '^0000120.*w.* +o +r +l +d +!' || exit 1
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit