[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/15: [tests]: Migrate to more recent test conventions.
From: |
G. Branden Robinson |
Subject: |
[groff] 09/15: [tests]: Migrate to more recent test conventions. |
Date: |
Thu, 1 Feb 2024 23:45:28 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit d35a095910bf4acebb82b04de8a4737361f68798
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Feb 1 16:55:58 2024 -0600
[tests]: Migrate to more recent test conventions.
...emitting the formatted output and updating the style of shell usage.
---
tmac/tests/an_link-macros-work-in-paragraph-tags.sh | 5 ++++-
tmac/tests/an_no-break-after-short-paragraph-tags.sh | 9 ++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tmac/tests/an_link-macros-work-in-paragraph-tags.sh
b/tmac/tests/an_link-macros-work-in-paragraph-tags.sh
index fb2d8986d..0cbb3f2c6 100755
--- a/tmac/tests/an_link-macros-work-in-paragraph-tags.sh
+++ b/tmac/tests/an_link-macros-work-in-paragraph-tags.sh
@@ -53,7 +53,8 @@ echo "$output" \
|| wail # 12 spaces
output=$(printf "%s" "$input" \
- | "$groff" -bww -Tascii -P-cbou -rU0 -rLL=130n -man)
+ | "$groff" -bww -Tascii -P-cbou $uflag -rLL=130n -man)
+echo "$output"
# Sloppy handling of UE, ME macro arguments can cause unwanted space.
echo "checking for normative (no extra) spacing after URI ($uflag)" >&2
@@ -64,6 +65,7 @@ uflag=-rU1
output=$(printf "%s" "$input" \
| "$groff" -bww -Tutf8 -P-cbou $uflag -man)
+echo "$output"
echo "checking for paragraph tag on line by itself ($uflag)" >&2
echo "$output" | grep -qx ' Roff\.js' || wail # 5 spaces
@@ -75,6 +77,7 @@ echo "$output" | grep -qx ' Roff\.js' || wail # 5 spaces
output=$(printf "%s" "$input" \
| "$groff" -bww -Tascii -P-cbou $uflag -rLL=130n -man)
+echo "$output"
echo "checking for normative (no extra) spacing after URI ($uflag)" >&2
# This is what we expect when linking the tag works.
diff --git a/tmac/tests/an_no-break-after-short-paragraph-tags.sh
b/tmac/tests/an_no-break-after-short-paragraph-tags.sh
index 0d75f9cf2..89c862724 100755
--- a/tmac/tests/an_no-break-after-short-paragraph-tags.sh
+++ b/tmac/tests/an_no-break-after-short-paragraph-tags.sh
@@ -25,9 +25,7 @@ groff="${abs_top_builddir:-.}/test-groff"
# A page break should not follow the tag in a tagged paragraph when the
# tag can fit within the indentation.
-FAIL=
-
-INPUT='.TH foo 1 2021-05-18 "groff test suite"
+input='.TH foo 1 2021-05-18 "groff test suite"
.SH Name
foo \- frobnicate a thingamajig
.rs \" force spacing on
@@ -36,8 +34,9 @@ foo \- frobnicate a thingamajig
3
7th edition'
-OUTPUT=$(echo "$INPUT" | "$groff" -Tascii -P-cbou -man -rcR=0)
+output=$(echo "$input" | "$groff" -Tascii -P-cbou -man -rcR=0)
+echo "$output"
-echo "$OUTPUT" | grep -Eqx ' +3 +7th edition'
+echo "$output" | grep -Eqx ' +3 +7th edition'
# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/15: [tests]: Migrate to more recent test conventions.,
G. Branden Robinson <=