gbranden pushed a commit to branch master
in repository groff.
commit fadf82ab2c989c1df745c4d221a76a6505a8a31e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 29 23:45:09 2026 -0500
[groff]: Unit-test `ti` request.
* src/roff/groff/tests/ti-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/ti-request-works.sh | 57 ++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0a5c21718..7e70b8abd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-29 G. Branden Robinson <[email protected]>
+
+ [groff]: Unit-test `ti` request.
+
+ * src/roff/groff/tests/ti-request-works.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2026-04-29 G. Branden Robinson <[email protected]>
* doc/groff.texi.in: Explicitly call out read-only registers as
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 93683b284..5f8a5eb48 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -150,6 +150,7 @@ groff_TESTS = \
src/roff/groff/tests/substring-request-works.sh \
src/roff/groff/tests/sv-and-os-requests-work.sh \
src/roff/groff/tests/sy-request-works.sh \
+ src/roff/groff/tests/ti-request-works.sh \
src/roff/groff/tests/trf-request-works.sh \
src/roff/groff/tests/unencodable-things-in-grout.sh \
src/roff/groff/tests/using-diversion-as-character-works.sh \
diff --git a/src/roff/groff/tests/ti-request-works.sh
b/src/roff/groff/tests/ti-request-works.sh
new file mode 100755
index 000000000..c1927e46e
--- /dev/null
+++ b/src/roff/groff/tests/ti-request-works.sh
@@ -0,0 +1,57 @@
+#!/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 >&2
+ fail=YES
+}
+
+input='.
+.c2 #
+foo
+.in 5n
+bar
+.br
+#in 10n
+baz
+.ti 0
+.br
+qux
+.br
+jat
+.ec @
+.pl @n(nlu
+.'
+
+echo "checking that 'ti' request works" >&2
+output=$(printf '%s\n' "$input" | "$groff" -T ascii)
+echo "$output"
+echo "$output" | grep -qx 'qux' || wail
+
+# TODO: Check that parser returns to correct state after '.ti' with no
+# arguments.
+
+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