[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 22/40: [tests]: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 22/40: [tests]: Trivially refactor. |
Date: |
Mon, 12 Dec 2022 19:28:06 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 0e298fef19e8517119d82fd18126aa68f31453dc
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Dec 11 11:38:01 2022 -0600
[tests]: Trivially refactor.
Also add more context in comment.
---
tmac/tests/an_font-remapping-does-not-affect-titles.sh | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tmac/tests/an_font-remapping-does-not-affect-titles.sh
b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
index 5f8c8c99a..d7a663ae8 100755
--- a/tmac/tests/an_font-remapping-does-not-affect-titles.sh
+++ b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
@@ -27,16 +27,20 @@ groff="${abs_top_builddir:-.}/test-groff"
# we want to ensure that font remapping for the headings doesn't affect
# page footers and headers.
-INPUT='.TH \\fIfoo\\fP 1 2021-10-04 "groff test suite"
+input='.TH \\fIfoo\\fP 1 2021-10-04 "groff test suite"
.SH Name
foo \\- a command with a very short name
.sp 50v
.SH "\\fIgroff\\fP integration"
A complicated situation.'
-OUTPUT=$(echo "$INPUT" | "$groff" -Tascii -man -rcR=0 -Z)
+output=$(echo "$input" | "$groff" -Tascii -man -rcR=0)
+echo "$output"
+output=$(echo "$input" | "$groff" -Tascii -man -rcR=0 -Z | nl)
+echo "$output"
# Expected:
+# 74 V2640
# 75 p2
# 76 x font 2 I
# 77 f2
@@ -44,7 +48,10 @@ OUTPUT=$(echo "$INPUT" | "$groff" -Tascii -man -rcR=0 -Z)
# 79 V160
# 80 H0
# 81 tfoo
+# 82 x font 1 R
+# 83 f1
+# 84 t(1)
-echo "$OUTPUT" | nl | grep -E '77[[:space:]]+f2'
+echo "$output" | grep -E '77[[:space:]]+f2'
# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 22/40: [tests]: Trivially refactor.,
G. Branden Robinson <=