mirror of
https://https.git.savannah.gnu.org/git/groff.git
synced 2026-01-26 15:39:07 +00:00
[tests]: Fix portability problems in 2 tests.
* src/roff/groff/tests/break_zero-length_output_line_sanely.sh: * tmac/tests/s_PN-works.sh: Migrate from `echo` to `printf` for test inputs containing backslashes to be interpreted literally. Fixes part of <https://savannah.gnu.org/bugs/?61302>. Thanks to Deri James for identifying the problem.
This commit is contained in:
parent
3e9b214a88
commit
244e55f660
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2021-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
|
||||
[tests]: Fix portability problems in 2 tests.
|
||||
|
||||
* src/roff/groff/tests/break_zero-length_output_line_sanely.sh:
|
||||
* tmac/tests/s_PN-works.sh: Migrate from `echo` to `printf` for
|
||||
test inputs containing backslashes to be interpreted literally.
|
||||
|
||||
Fixes part of <https://savannah.gnu.org/bugs/?61302>. Thanks to
|
||||
Deri James for identifying the problem.
|
||||
|
||||
2021-10-08 G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
|
||||
[grotty]: Slightly refactor.
|
||||
|
||||
@ -31,12 +31,13 @@ INPUT='.de _
|
||||
. nh
|
||||
. ll 0
|
||||
. di A
|
||||
\\&\\\\$1
|
||||
\&\\$1
|
||||
. di
|
||||
. br
|
||||
..
|
||||
._ " XYZ"
|
||||
.A'
|
||||
.A
|
||||
'
|
||||
|
||||
OUTPUT=$(echo "$INPUT" | "$groff" -Tascii)
|
||||
OUTPUT=$(printf "%s" "$INPUT" | "$groff" -Tascii)
|
||||
echo "$OUTPUT" | grep -qx XYZ
|
||||
|
||||
@ -27,10 +27,10 @@ groff="${abs_top_builddir:-.}/test-groff"
|
||||
EXAMPLE=\
|
||||
'.bp 2
|
||||
.LP
|
||||
This is page \\n[PN].
|
||||
This is page \n[PN].
|
||||
'
|
||||
|
||||
echo "$EXAMPLE" \
|
||||
printf "%s" "$EXAMPLE" \
|
||||
| "$groff" -Tascii -P-cbou -ms \
|
||||
| grep -Fqx 'This is page 2.'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user