gbranden pushed a commit to branch master
in repository groff.

commit cebfa10c6a6fbd1b7e7269b7760551078a34c307
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 5 20:19:55 2026 -0500

    [groff]: Add unit test for `fzoom` request.
    
    * src/roff/groff/tests/fzoom-request-works.sh: Do it.
    
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test script based on log of commit f03e6f62e1, 2023-08-04--thus the
    copyright year range.  (One could argue thresholds; see our "HACKING"
    file.  I'm up for the armchair lawyering if you are!)
---
 ChangeLog                                   |  7 +++++
 src/roff/groff/groff.am                     |  1 +
 src/roff/groff/tests/fzoom-request-works.sh | 43 +++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 55b87593e..87931d188 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-07-05  G. Branden Robinson <[email protected]>
+
+       [groff]: Add unit test for `fzoom` request.
+
+       * src/roff/groff/tests/fzoom-request-works.sh: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2026-07-05  G. Branden Robinson <[email protected]>
 
        * tmac/an.tmac (RE): Rename "local" macro `an-RE-problem` to
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index e435aac3a..ad8fa7df1 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -107,6 +107,7 @@ groff_TESTS = \
   src/roff/groff/tests/evc-request-produces-no-output-if-invalid.sh \
   src/roff/groff/tests/fi-and-nf-requests-work.sh \
   src/roff/groff/tests/fp-request-does-not-traverse-directories.sh \
+  src/roff/groff/tests/fzoom-request-works.sh \
   src/roff/groff/tests/handle-special-input-code-points.sh \
   src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh \
   src/roff/groff/tests/hcode-request-copies-spec-char-code.sh \
diff --git a/src/roff/groff/tests/fzoom-request-works.sh 
b/src/roff/groff/tests/fzoom-request-works.sh
new file mode 100755
index 000000000..69dd14f16
--- /dev/null
+++ b/src/roff/groff/tests/fzoom-request-works.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright 2023-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 over
+# 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"
+
+input='.
+A: The width of "foo" is \w"foo" at \n[.ps] scaled points.
+.sp
+.ps 20
+.vs 24
+B: The width of "foo" is \w"foo" at \n[.ps] scaled points.
+.sp
+.ps 10
+.vs 12
+.sp
+Setting zoom factor.\|.\|.
+.sp
+.fzoom TR 2000
+C: The width of "foo" is \w"foo" at \n[.ps] scaled points.
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -a)
+echo "$output"
+echo "$output" \
+    | grep -Fqx 'C: The width of "foo" is 26660 at 10000 scaled points.'
+
+# 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