summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-19 01:24:20 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-19 10:24:19 -0600
commit3aa9d30cf47d4bb945276db6a3b963141d93f179 (patch)
treecaa66e7b81784ba116211514b8c5419206ca0d04 /src
parent3cf8b8fde598eba34537d71723325bb2f59d09c5 (diff)
downloadgroff-git-3aa9d30cf47d4bb945276db6a3b963141d93f179.tar.gz
[groff]: Improve portability of a test.
* src/roff/groff/tests/regression_savannah_58153.sh: Improve portability. Avoid the unpredictability of implementations when putting backslashes inside a groff-piped printf shell command inside a here document inside a command substitution by changing the groff escape character to something meaningless to the shell and to printf ('@'). Fixes a test failure on Solaris 11.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/roff/groff/tests/regression_savannah_58153.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/roff/groff/tests/regression_savannah_58153.sh b/src/roff/groff/tests/regression_savannah_58153.sh
index 5ad92c470..25771fd7a 100755
--- a/src/roff/groff/tests/regression_savannah_58153.sh
+++ b/src/roff/groff/tests/regression_savannah_58153.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2020 Free Software Foundation, Inc.
+# Copyright (C) 2020-2023 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -23,7 +23,8 @@ groff="${abs_top_builddir:-.}/test-groff"
# Ensure that we get backtrace output across file and pipe boundaries.
# Savannah #58153.
OUT=$("$groff" -b -ww -U 2>&1 >/dev/null <<EOF
-.pso printf '\\\s[-20]\\\n'
+.ec @
+.pso printf '@s[-20]'
EOF
)