gbranden pushed a commit to branch master
in repository groff.

commit c0d8b1f4aa419f7b9a27774a4779574e9092df64
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 22 02:39:20 2026 -0600

    [grotty]: Unit-test continuous underlining.
    
    * src/devices/grotty/tests/continuous-underlining-works.sh: New file; do
      it.
    
    * src/devices/grotty/grotty.am: Update `grotty_TESTS` to run test.
---
 ChangeLog                                          |  9 ++++
 src/devices/grotty/grotty.am                       |  1 +
 .../grotty/tests/continuous-underlining-works.sh   | 58 ++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 31ec07759..20968aaeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-11-22  G. Branden Robinson <[email protected]>
+
+       [grotty]: Unit-test continuous underlining.
+
+       * src/devices/grotty/tests/continuous-underlining-works.sh: New
+       file; do it.
+       * src/devices/grotty/grotty.am: Update `grotty_TESTS` to run
+       test.
+
 2026-11-22  G. Branden Robinson <[email protected]>
 
        * src/devices/grotty/tty.cpp (tty_printer::add_char): Recast
diff --git a/src/devices/grotty/grotty.am b/src/devices/grotty/grotty.am
index 9e19d4c1d..e637cb274 100644
--- a/src/devices/grotty/grotty.am
+++ b/src/devices/grotty/grotty.am
@@ -35,6 +35,7 @@ EXTRA_DIST += \
 
 grotty_TESTS = \
   src/devices/grotty/tests/basic-latin-glyphs-map-correctly.sh \
+  src/devices/grotty/tests/continuous-underlining-works.sh \
   src/devices/grotty/tests/do-not-segv-on-huge-vertical-motion.sh \
   src/devices/grotty/tests/h-option-works.sh \
   src/devices/grotty/tests/osc8-works.sh
diff --git a/src/devices/grotty/tests/continuous-underlining-works.sh 
b/src/devices/grotty/tests/continuous-underlining-works.sh
new file mode 100755
index 000000000..e73e3a92b
--- /dev/null
+++ b/src/devices/grotty/tests/continuous-underlining-works.sh
@@ -0,0 +1,58 @@
+#!/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/>.
+
+grotty="${abs_top_builddir:-.}/grotty"
+
+input='#
+x T ascii
+x res 240 24 40
+x init
+p1
+V40
+H0
+x font 2 I
+f2
+s10
+V40
+H0
+md
+DFd
+x u 1
+tabc
+wh24
+tdef
+x font 1 R
+f1
+V40
+H168
+x u 0
+n40 0
+x trailer
+V2640
+x stop
+#'
+
+output=$(printf '%s\n' "$input" \
+    | "$grotty" -F font -F build/font -cbou \
+    | sed '/^$/d')
+echo "$output"
+echo "$output" | od -c
+echo "$output" | od -c | grep -Eq '^0000000.*a +b +c +_ +\\b +d +e +f'
+
+# 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