groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 04/115: [man]: Improve test sensitivity.


From: G. Branden Robinson
Subject: [groff] 04/115: [man]: Improve test sensitivity.
Date: Thu, 1 Jun 2023 10:45:56 -0400 (EDT)

gbranden pushed a commit to branch branden-2022-06-01
in repository groff.

commit c4262aa21a927dc8abc8962b2d5dadb067e4e216
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Apr 22 02:57:05 2023 -0500

    [man]: Improve test sensitivity.
    
    * tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh: Do it.
    
    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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]