gbranden pushed a commit to branch master
in repository groff.
commit 0a3eb74abf3e07df38288278b4d622a7dc10cac6
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Oct 23 16:59:59 2024 -0500
[troff]: Fix incorrect unit in pev request output.
* src/roff/troff/env.cpp (font_size::dump_size_list): Fix incorrect unit
in reported list--it should be "s", not "z": these are not
scaled/subdivisible points but the subdivided units themselves.
* src/roff/groff/tests/sizes-request-works.sh: Update text expectations.
---
ChangeLog | 10 ++++++++++
src/roff/groff/tests/sizes-request-works.sh | 4 ++--
src/roff/troff/env.cpp | 4 ++--
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 22058d847..b6235fe6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-23 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/env.cpp (font_size::dump_size_list): Fix
+ incorrect unit in reported list--it should be "s", not "z":
+ these are not scaled/subdivisible points but the subdivided
+ units themselves.
+
+ * src/roff/groff/tests/sizes-request-works.sh: Update text
+ expectations.
+
2024-10-23 G. Branden Robinson <[email protected]>
[troff]: Trivially refactor, renaming the font size "table" to
diff --git a/src/roff/groff/tests/sizes-request-works.sh
b/src/roff/groff/tests/sizes-request-works.sh
index 0a4553e2d..d0d8d3cbd 100755
--- a/src/roff/groff/tests/sizes-request-works.sh
+++ b/src/roff/groff/tests/sizes-request-works.sh
@@ -28,7 +28,7 @@ input='.
echo "checking that 'sizes' request works" >&2
output=$(printf '%s\n' "$input" | "$groff" -T ps 2>&1)
-echo "$output" | grep 'valid type size table'
-echo "$output" | grep -Fq '2z-20z, 36z'
+echo "$output" | grep 'valid type size list'
+echo "$output" | grep -Fq '2s-20s, 36s'
# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index cd6fea8a7..aa43a543e 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -262,9 +262,9 @@ void font_size::dump_size_list()
if (need_comma)
errprint(", ");
if (lo == hi)
- errprint("%1z", lo);
+ errprint("%1s", lo);
else
- errprint("%1z-%2z", lo, hi);
+ errprint("%1s-%2s", lo, hi);
need_comma = true;
}
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit