[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 04/74: [man]: Improve test sensitivity.
From: |
G. Branden Robinson |
Subject: |
[groff] 04/74: [man]: Improve test sensitivity. |
Date: |
Fri, 28 Apr 2023 15:10:40 -0400 (EDT) |
gbranden pushed a commit to branch branden-2023-04-28
in repository groff.
commit 59444841c8fb2252b9a6986685f9e20abfea92d3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Apr 22 02:57:05 2023 -0500
[man]: Improve test sensitivity.
Also migrate to more recent test conventions, emitting the formatted
output and updating the style of shell usage.
---
tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh
b/tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh
index 3c30cd48d..84701b5ca 100755
--- a/tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh
+++ b/tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh
@@ -24,8 +24,7 @@ groff="${abs_top_builddir:-.}/test-groff"
#
# The interior of this text is fragile with respect to line count.
-EXAMPLE='
-.TH ts\-hell 1 2020-10-09 "groff test suite"
+input='.TH ts\-hell 1 2020-10-09 "groff test suite"
.SH Name
ts\-hell \- turn off tbl keeps when continuous rendering
.SH Description
@@ -42,10 +41,11 @@ is set.
.
.TS
l.
-'$(n=1; while [ $n -le 53 ]; do echo $n; n=$(( n + 1 )); done)'
+'$(n=1; while [ $n -le 66 ]; do echo $n; n=$(( n + 1 )); done)'
.TE'
-OUTPUT=$(printf "%s\n" "$EXAMPLE" | "$groff" -Tascii -P-cbou -t -man)
-test -n "$(echo "$OUTPUT" | sed -n '/52/{N;/53/p;}')"
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -t -man)
+echo "$output"
+test -z "$(echo "$output" | sed -n '/^ *1$/,/^ *66$/s/^ *$/FNORD/p')"
# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 04/74: [man]: Improve test sensitivity.,
G. Branden Robinson <=