gbranden pushed a commit to branch master
in repository groff.

commit 44d279fa08f3fd7cfd295380cbeb311dfb93f5ad
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 2 07:46:00 2026 -0600

    [soelim]: Test use of leading quotes.
    
    ...after `.so` tokens.
    
    * src/preproc/soelim/tests/leading-quote-before-file-name-works.sh: New
      file.
    
    * src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run test.
---
 ChangeLog                                          |  9 ++++
 src/preproc/soelim/soelim.am                       |  1 +
 .../tests/leading-quote-before-file-name-works.sh  | 52 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index da1cf4b9f..780324107 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-11-02  G. Branden Robinson <[email protected]>
+
+       [soelim]: Test use of leading quotes after `.so` tokens.
+
+       * src/preproc/soelim/tests/\
+       leading-quote-before-file-name-works.sh: New file.
+       * src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run
+       test.
+
 2026-11-02  G. Branden Robinson <[email protected]>
 
        [soelim]: Add smoke test.
diff --git a/src/preproc/soelim/soelim.am b/src/preproc/soelim/soelim.am
index 6c6f87f87..eeef649d0 100644
--- a/src/preproc/soelim/soelim.am
+++ b/src/preproc/soelim/soelim.am
@@ -22,6 +22,7 @@ EXTRA_DIST += \
   src/preproc/soelim/soelim.1.man
 
 soelim_TESTS = \
+  src/preproc/soelim/tests/leading-quote-before-file-name-works.sh \
   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 \
diff --git a/src/preproc/soelim/tests/leading-quote-before-file-name-works.sh 
b/src/preproc/soelim/tests/leading-quote-before-file-name-works.sh
new file mode 100755
index 000000000..e9f8ff058
--- /dev/null
+++ b/src/preproc/soelim/tests/leading-quote-before-file-name-works.sh
@@ -0,0 +1,52 @@
+#!/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
+
+input='.
+.so "included
+stuff
+.'
+
+output=$(printf '%s\n' "$input" | "$soelim" -I "$artifacts_dir")
+echo "$output"
+munged_output=$(printf '%s' "$output" | tr '\n' ' ')
+echo "$munged_output" | grep -q 'included \.lf 3 "- 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

Reply via email to