gbranden pushed a commit to branch master
in repository groff.

commit 76534eb4775c6f115feec749020edabb8e708a0a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Nov 25 00:21:56 2026 -0600

    [soelim]: Test acceptance of backslashes.
    
    ...in file names.
    
    * src/preproc/soelim/tests/accept-backslash-in-file-name.sh: New file;
      test the `\e` and `\\` syntaxes.
    
    * src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run test.
---
 ChangeLog                                          |  9 +++++
 src/preproc/soelim/soelim.am                       |  1 +
 .../soelim/tests/accept-backslash-in-file-name.sh  | 39 ++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index bc0c1d343..87e735cb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-11-25  G. Branden Robinson <[email protected]>
+
+       [soelim]: Test acceptance of backslashes in file names.
+
+       * src/preproc/soelim/tests/accept-backslash-in-file-name.sh: New
+       file; test the `\e` and `\\` syntaxes.
+       * src/preproc/soelim/soelim.am: Update `soelim_TESTS` to run
+       test.
+
 2026-11-24  G. Branden Robinson <[email protected]>
 
        [troff]: Add `pft` request.
diff --git a/src/preproc/soelim/soelim.am b/src/preproc/soelim/soelim.am
index cccb94d1c..c6b5f44da 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/accept-backslash-in-file-name.sh \
   src/preproc/soelim/tests/exercise-finite-state-machine.sh \
   src/preproc/soelim/tests/leading-quote-before-file-name-works.sh \
   src/preproc/soelim/tests/passes-through-input-with-eighth-bit-set.sh \
diff --git a/src/preproc/soelim/tests/accept-backslash-in-file-name.sh 
b/src/preproc/soelim/tests/accept-backslash-in-file-name.sh
new file mode 100755
index 000000000..82691574c
--- /dev/null
+++ b/src/preproc/soelim/tests/accept-backslash-in-file-name.sh
@@ -0,0 +1,39 @@
+#!/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/>.
+
+soelim="${abs_top_builddir:-.}/soelim"
+
+fail=
+
+wail () {
+  echo "...FAILED" >&2
+  fail=yes
+}
+
+# Discard stderr; we don't care that named files don't exist.
+
+echo "checking that soelim accepts backslash-e in file name" >&2
+output1=$(printf '.so foo\\ebar\n' | "$soelim" 2> /dev/null)
+test -z "$output1" || wail
+
+echo "checking that soelim accept doubled backslash in file name" >&2
+output2=$(printf '.so baz\\\\qux\n' | "$soelim" 2> /dev/null)
+test -z "$output2" || wail
+
+# 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