[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/35: [man,doc]: Write tests more portably.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/35: [man,doc]: Write tests more portably. |
Date: |
Tue, 10 Dec 2024 16:35:31 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 8ff14fb9a69a13912fb00190991c9a984b013b8d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 7 18:14:58 2024 -0600
[man,doc]: Write tests more portably.
Be less indirect with use of printf(1).
Fixes test failures on Solaris 11.
---
tmac/tests/an_vertical-margins-are-correct.sh | 5 ++---
tmac/tests/doc-old_vertical-margins-are-correct.sh | 5 ++---
tmac/tests/doc_vertical-margins-are-correct.sh | 5 ++---
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/tmac/tests/an_vertical-margins-are-correct.sh
b/tmac/tests/an_vertical-margins-are-correct.sh
index 2482da436..666ea3793 100755
--- a/tmac/tests/an_vertical-margins-are-correct.sh
+++ b/tmac/tests/an_vertical-margins-are-correct.sh
@@ -27,7 +27,7 @@ wail () {
fail=YES
}
-input1='.
+input='.
.TH foo 1 2024-11-08 "groff test suite"
.nf
1
@@ -82,9 +82,8 @@ input1='.
50
51
52'
-input2=$(printf "\\c\n'fi\n")
-output=$(printf "%s" "$input1" "$input2" \
+output=$(printf "%s"'\\c'"\n'fi\n" "$input" \
| "$groff" -r cR=0 -m an -T ascii -P -cbou | nl -ba)
echo "$output"
diff --git a/tmac/tests/doc-old_vertical-margins-are-correct.sh
b/tmac/tests/doc-old_vertical-margins-are-correct.sh
index 3005c32ed..948f00fef 100755
--- a/tmac/tests/doc-old_vertical-margins-are-correct.sh
+++ b/tmac/tests/doc-old_vertical-margins-are-correct.sh
@@ -27,7 +27,7 @@ wail () {
fail=YES
}
-input1='.
+input='.
.Dd 2024-11-08
.Os "groff test suite"
.Dt foo 1
@@ -84,9 +84,8 @@ input1='.
49
50
51'
-input2=$(printf "\\c\n'fi\n")
-output=$(printf "%s" "$input1" "$input2" \
+output=$(printf "%s"'\\c'"\n'fi\n" "$input" \
| "$groff" -r cR=0 -m doc-old -T ascii -P -cbou | nl -ba)
echo "$output"
diff --git a/tmac/tests/doc_vertical-margins-are-correct.sh
b/tmac/tests/doc_vertical-margins-are-correct.sh
index 7d66d2bbf..00a27485a 100755
--- a/tmac/tests/doc_vertical-margins-are-correct.sh
+++ b/tmac/tests/doc_vertical-margins-are-correct.sh
@@ -27,7 +27,7 @@ wail () {
fail=YES
}
-input1='.
+input='.
.Dd 2024-11-08
.Dt foo 1
.Os "groff test suite"
@@ -84,9 +84,8 @@ input1='.
50
51
52'
-input2=$(printf "\\c\n'fi\n")
-output=$(printf "%s" "$input1" "$input2" \
+output=$(printf "%s"'\\c'"\n'fi\n" "$input" \
| "$groff" -r cR=0 -m doc -T ascii -P -cbou | nl -ba)
echo "$output"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/35: [man,doc]: Write tests more portably.,
G. Branden Robinson <=