gbranden pushed a commit to branch master
in repository groff.
commit dacc09fb93eec8488c4d115d9ee1f221992663af
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Dec 20 20:15:26 2025 -0600
[groff]: Add smoke test for "lbp" device.
* src/roff/groff/tests/lbp-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/lbp-device-smoke-test.sh | 31 +++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9b8a094c5..061aadeab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-12-20 G. Branden Robinson <[email protected]>
+
+ * src/roff/groff/tests/lbp-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/safer-mode-works.sh: Fix newly added test
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index dcc55f741..b73b99342 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -94,6 +94,7 @@ groff_TESTS = \
src/roff/groff/tests/hys-request-works.sh \
src/roff/groff/tests/initialization-is-quiet.sh \
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/logical-predicates-work.sh \
src/roff/groff/tests/localization-works.sh \
diff --git a/src/roff/groff/tests/lbp-device-smoke-test.sh
b/src/roff/groff/tests/lbp-device-smoke-test.sh
new file mode 100755
index 000000000..2057e9c4f
--- /dev/null
+++ b/src/roff/groff/tests/lbp-device-smoke-test.sh
@@ -0,0 +1,31 @@
+#!/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:
+#0001600 H e l l o , esc [ - 1 4 ; 3 5 0 f
+#0001620 w o r l d ! ff esc P 1 y esc \ esc c esc
+
+output=$(echo "Hello, world!" | "$groff" -T lbp | od -t a)
+echo "$output" | grep '^00016[02]0'
+echo "$output" | grep -Eq '^0001600.*H +e +l +l +o +,' || exit 1
+echo "$output" | grep -Eq '^0001620.*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