gbranden pushed a commit to branch master
in repository groff.
commit f7ee46447d70698cd1c46303c890a2bcd8944663
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 2 06:19:16 2026 -0600
[soelim]: Add smoke test.
* src/preproc/soelim/tests/smoke-test.sh: New file; do it.
* src/preproc/soelim/tests/artifacts/included:
* src/preproc/soelim/tests/artifacts/sorcerer: New files.
* src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run test.
Add artifacts to `EXTRA_DIST`.
---
ChangeLog | 10 ++++++
src/preproc/soelim/soelim.am | 6 ++++
src/preproc/soelim/tests/artifacts/included | 2 ++
src/preproc/soelim/tests/artifacts/sorcerer | 2 ++
src/preproc/soelim/tests/smoke-test.sh | 48 +++++++++++++++++++++++++++++
5 files changed, 68 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 624067e0d..da1cf4b9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-11-02 G. Branden Robinson <[email protected]>
+
+ [soelim]: Add smoke test.
+
+ * src/preproc/soelim/tests/smoke-test.sh: New file; do it.
+ * src/preproc/soelim/tests/artifacts/included:
+ * src/preproc/soelim/tests/artifacts/sorcerer: New files.
+ * src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run
+ test. Add artifacts to `EXTRA_DIST`.
+
2026-11-01 G. Branden Robinson <[email protected]>
[soelim]: Document `-x` option introduced in groff 1.25.
diff --git a/src/preproc/soelim/soelim.am b/src/preproc/soelim/soelim.am
index ab23eb0f6..6c6f87f87 100644
--- a/src/preproc/soelim/soelim.am
+++ b/src/preproc/soelim/soelim.am
@@ -23,11 +23,17 @@ EXTRA_DIST += \
soelim_TESTS = \
src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh \
+ src/preproc/soelim/tests/smoke-test.sh \
src/preproc/soelim/tests/space-in-argument-works.sh \
src/preproc/soelim/tests/x-option-works.sh
TESTS += $(soelim_TESTS)
EXTRA_DIST += $(soelim_TESTS)
+# required test artifacts
+EXTRA_DIST += \
+ src/preproc/soelim/tests/artifacts/included \
+ src/preproc/soelim/tests/artifacts/sorcerer
+
# Local Variables:
# fill-column: 72
# mode: makefile-automake
diff --git a/src/preproc/soelim/tests/artifacts/included
b/src/preproc/soelim/tests/artifacts/included
new file mode 100644
index 000000000..7548deb27
--- /dev/null
+++ b/src/preproc/soelim/tests/artifacts/included
@@ -0,0 +1,2 @@
+This file deliberately lacks a trailing newline.
+included
\ No newline at end of file
diff --git a/src/preproc/soelim/tests/artifacts/sorcerer
b/src/preproc/soelim/tests/artifacts/sorcerer
new file mode 100644
index 000000000..e886d9119
--- /dev/null
+++ b/src/preproc/soelim/tests/artifacts/sorcerer
@@ -0,0 +1,2 @@
+.so included
+stuff
diff --git a/src/preproc/soelim/tests/smoke-test.sh
b/src/preproc/soelim/tests/smoke-test.sh
new file mode 100755
index 000000000..794acc084
--- /dev/null
+++ b/src/preproc/soelim/tests/smoke-test.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Copyright 2026 Free Software Foundation, Inc.
+#
+# 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/>.
+
+soelim="${abs_top_builddir:-.}/soelim"
+
+# Locate directory containing our test artifacts.
+artifacts_dir=
+
+for buildroot in . .. ../..
+do
+ d=$buildroot/src/preproc/soelim/tests/artifacts
+ if [ -d "$d" ]
+ then
+ artifacts_dir=$d
+ break
+ fi
+done
+
+# If we can't find it, we can't test.
+if [ -z "$artifacts_dir" ]
+then
+ echo "cannot find test artifact directory; skipping" >&2
+ exit 77 # skip
+fi
+
+output=$(echo "$input" \
+ | "$soelim" -I "$artifacts_dir" "$artifacts_dir"/sorcerer)
+echo "$output"
+munged_output=$(printf '%s' "$output" | tr '\n' ' ')
+echo "$munged_output" | grep -q 'included \.lf 2 .* stuff'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit