gbranden pushed a commit to branch master
in repository groff.

commit 2ea1bc79b817bb45ccb0d0088f06f9d9424dd0c0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 8 10:16:00 2026 -0500

    [groff]: Unit-test `linetabs` request.
    
    * src/roff/groff/tests/linetabs-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/linetabs-request-works.sh | 60 ++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index aadeb2f48..04d5fefa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-08  G. Branden Robinson <[email protected]>
+
+       [groff]: Unit-test `linetabs` request.
+
+       * src/roff/groff/tests/linetabs-request-works.sh: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2026-04-08  G. Branden Robinson <[email protected]>
 
        [troff]: Refactor.  Separate engine logic from input parsing
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 28712fe28..bc26fb2d2 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -101,6 +101,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/linetabs-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 \
diff --git a/src/roff/groff/tests/linetabs-request-works.sh 
b/src/roff/groff/tests/linetabs-request-works.sh
new file mode 100755
index 000000000..ae7dfefeb
--- /dev/null
+++ b/src/roff/groff/tests/linetabs-request-works.sh
@@ -0,0 +1,60 @@
+#!/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"
+
+fail=
+
+wail () {
+   echo "...FAILED"
+   fail=yes
+}
+
+# Literal tabs appear in this input.
+input='.
+.linetabs 0
+.ta 1i 3i
+A      \c
+B      \c
+C
+.br
+.linetabs
+D      \c
+E      \c
+F
+.'
+
+# Expected output:
+#
+# 1.  J.  Fict. Ch. Soc. 6 (2020), 3-14.  Reprints
+# no longer available through FCS.      2.  Better
+# known for other work.
+
+output=$(printf '%s\n' "$input" | "$groff" -T ascii)
+echo "$output"
+
+echo "checking output when line tabs disabled" >&2
+echo "$output" | grep -qx "A         B         C" || wail
+
+echo "checking output when line tabs enabled" >&2
+echo "$output" | grep -qx "D         E                   F" || wail
+
+test -z "$fail"
+
+# 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