gbranden pushed a commit to branch master
in repository groff.
commit 276c95e3271778cf4d69764e3a905bbb6446224b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Apr 11 06:16:54 2026 -0500
[groff]: Test unusual characters in identifiers.
...improving coverage of
src/libs/libgroff/symbol.cpp:symbol::json_extract().
* src/roff/groff/tests/coverage-symbol-cpp.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
---
ChangeLog | 8 ++++++++
src/roff/groff/groff.am | 1 +
src/roff/groff/tests/coverage-symbol-cpp.sh | 31 +++++++++++++++++++++++++++++
3 files changed, 40 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index dfe02dcf7..8e4f45105 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-11 G. Branden Robinson <[email protected]>
+
+ [groff]: Test unusual characters in identifiers, improving
+ coverage of src/libs/libgroff/symbol.cpp:symbol::json_extract().
+
+ * src/roff/groff/tests/coverage-symbol-cpp.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2026-04-11 G. Branden Robinson <[email protected]>
[groff]: Validate error path in
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 65c60376c..7b12a9276 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -56,6 +56,7 @@ groff_TESTS = \
src/roff/groff/tests/check-delimiter-validity.sh \
src/roff/groff/tests/class-request-works.sh \
src/roff/groff/tests/composite-nodes-produce-approximate-output.sh \
+ src/roff/groff/tests/coverage-symbol-cpp.sh \
src/roff/groff/tests/current-language-and-environment-in-sync.sh \
src/roff/groff/tests/degenerate-control-flow-works.sh \
src/roff/groff/tests/detect-evil-link-time-optimizer.sh \
diff --git a/src/roff/groff/tests/coverage-symbol-cpp.sh
b/src/roff/groff/tests/coverage-symbol-cpp.sh
new file mode 100755
index 000000000..7fed270fc
--- /dev/null
+++ b/src/roff/groff/tests/coverage-symbol-cpp.sh
@@ -0,0 +1,31 @@
+#!/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"
+
+# Improve code coverage.
+#
+# Construct an identifier (backed by groff's `symbol` class) with an
+# unusual character in it.
+
+output=$(printf '.ds a"b foobar\n.pm a"b\n' | "$groff" -ww 2>&1)
+
+echo "$output"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit