gbranden pushed a commit to branch master
in repository groff.

commit 30a81fbc3c711644caeac791ad5c843bda38e7df
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 06:21:28 2026 -0500

    [groff]: Unit-test `dt` request.
    
    * src/roff/groff/tests/dt-request-works.sh: Do it.
    
    * src/roff/groff/groff.am (groff_TESTS): Run test.
---
 ChangeLog                                |  7 +++++
 src/roff/groff/groff.am                  |  1 +
 src/roff/groff/tests/dt-request-works.sh | 45 ++++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 363465f58..a800dc2d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-14  G. Branden Robinson <[email protected]>
+
+       [groff]: Unit-test `dt` request.
+
+       * src/roff/groff/tests/dt-request-works.sh: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2026-04-14  G. Branden Robinson <[email protected]>
 
        [groff]: Unit-test `aln` and `als` requests.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index f159ae3db..9cc52ba6a 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -89,6 +89,7 @@ groff_TESTS = \
   src/roff/groff/tests/draw-polygon.sh \
   src/roff/groff/tests/draw-spline.sh \
   src/roff/groff/tests/driver-C-and-G-options-work.sh \
+  src/roff/groff/tests/dt-request-works.sh \
   src/roff/groff/tests/dvi-device-smoke-test.sh \
   src/roff/groff/tests/error-overflow-symbol-table.sh \
   src/roff/groff/tests/evc-request-produces-no-output-if-invalid.sh \
diff --git a/src/roff/groff/tests/dt-request-works.sh 
b/src/roff/groff/tests/dt-request-works.sh
new file mode 100755
index 000000000..c0f071761
--- /dev/null
+++ b/src/roff/groff/tests/dt-request-works.sh
@@ -0,0 +1,45 @@
+#!/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/>.
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Unit-test `dt` request.
+
+input='.
+.de TT
+BOING
+.br
+..
+.di DD
+.dt 3v TT
+.nf
+foo
+bar
+.sp
+qux
+.di
+.DD
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -a 2>/dev/null)
+echo "$output"
+output=$(echo $output) # condense onto one line
+echo "$output" | grep -q "bar BOING qux"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to