diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-22 13:03:51 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-22 15:18:20 -0600 |
commit | 14b01348259c2159e5221f797bc9b9a68260a7d3 (patch) | |
tree | 48fbb85a05fda93c08155a915266ebe3bd971d70 | |
parent | b2157f22b5b2a3abb8f5a972833e9335752cb09b (diff) | |
download | groff-git-14b01348259c2159e5221f797bc9b9a68260a7d3.tar.gz |
[tests]: Have more tests report output.
* src/roff/groff/tests/ab_works.sh:
* src/roff/groff/tests/handle_special_input_code_points.sh:
* src/roff/groff/tests/initialization_is_quiet.sh:
* src/roff/groff/tests/msoquiet_works.sh:
* src/roff/groff/tests/soquiet_works.sh:
* tmac/tests/an-ext_MR-works.sh:
* tmac/tests/an_MR-works.sh: Do it.
-rw-r--r-- | ChangeLog | 12 | ||||
-rwxr-xr-x | src/roff/groff/tests/ab_works.sh | 6 | ||||
-rwxr-xr-x | src/roff/groff/tests/handle_special_input_code_points.sh | 3 | ||||
-rwxr-xr-x | src/roff/groff/tests/initialization_is_quiet.sh | 1 | ||||
-rwxr-xr-x | src/roff/groff/tests/msoquiet_works.sh | 1 | ||||
-rwxr-xr-x | src/roff/groff/tests/soquiet_works.sh | 1 | ||||
-rwxr-xr-x | tmac/tests/an-ext_MR-works.sh | 1 | ||||
-rwxr-xr-x | tmac/tests/an_MR-works.sh | 1 |
8 files changed, 22 insertions, 4 deletions
@@ -1,5 +1,17 @@ 2023-02-22 G. Branden Robinson <g.branden.robinson@gmail.com> + [tests]: Have more tests report output. + + * src/roff/groff/tests/ab_works.sh: + * src/roff/groff/tests/handle_special_input_code_points.sh: + * src/roff/groff/tests/initialization_is_quiet.sh: + * src/roff/groff/tests/msoquiet_works.sh: + * src/roff/groff/tests/soquiet_works.sh: + * tmac/tests/an-ext_MR-works.sh: + * tmac/tests/an_MR-works.sh: Do it. + +2023-02-22 G. Branden Robinson <g.branden.robinson@gmail.com> + [tests]: Prevent failures when $GROFF_ENCODING is set. * src/roff/groff/tests/ab_works.sh: diff --git a/src/roff/groff/tests/ab_works.sh b/src/roff/groff/tests/ab_works.sh index 589387dcc..b3538376e 100755 --- a/src/roff/groff/tests/ab_works.sh +++ b/src/roff/groff/tests/ab_works.sh @@ -31,16 +31,16 @@ unset GROFF_ENCODING for d in ascii cp1047 dvi html latin1 lbp lj4 pdf ps utf8 do echo "verifying exit status of .ab request using $d device" >&2 - printf '.ab\n' | "$groff" -T$d + printf '.ab\n' | "$groff" -Z -T$d test $? -eq 1 || exit 1 done echo "verifying empty output of .ab request with no arguments" >&2 -OUT=$(printf '.ab\n' | "$groff" -Tascii 2>&1) +OUT=$(printf '.ab\n' | "$groff" -Z -Tascii 2>&1) test "$OUT" = "" || exit 1 echo "verifying that arguments to .ab request go to stderr" >&2 -OUT=$(printf '.ab foo\n' | "$groff" -Tascii 2>&1 > /dev/null) +OUT=$(printf '.ab foo\n' | "$groff" -Z -Tascii 2>&1 > /dev/null) test "$OUT" = "foo" || exit 1 # vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72: diff --git a/src/roff/groff/tests/handle_special_input_code_points.sh b/src/roff/groff/tests/handle_special_input_code_points.sh index 1e4f9a476..c996150eb 100755 --- a/src/roff/groff/tests/handle_special_input_code_points.sh +++ b/src/roff/groff/tests/handle_special_input_code_points.sh @@ -35,7 +35,8 @@ wail () { fail=yes } -output=$(printf "%s\n" "$input" | "$groff" -z 2>&1) +output=$(printf "%s\n" "$input" | "$groff" -Z 2>&1) +echo "$output" printf "checking that input no-break space is mapped to \\~\n" echo "$output" | grep -qx 'input no-break space matches \\~' || wail diff --git a/src/roff/groff/tests/initialization_is_quiet.sh b/src/roff/groff/tests/initialization_is_quiet.sh index ee3070bde..f693840c6 100755 --- a/src/roff/groff/tests/initialization_is_quiet.sh +++ b/src/roff/groff/tests/initialization_is_quiet.sh @@ -36,6 +36,7 @@ do do echo "testing \"-m $LOCALE\"; COMPAT=\"$COMPAT\"" OUTPUT=$("$groff" -ww -m $LOCALE "$COMPAT" < /dev/null 2>&1) + echo "$OUTPUT" test -z "$OUTPUT" done done diff --git a/src/roff/groff/tests/msoquiet_works.sh b/src/roff/groff/tests/msoquiet_works.sh index bb86427bd..80c085abb 100755 --- a/src/roff/groff/tests/msoquiet_works.sh +++ b/src/roff/groff/tests/msoquiet_works.sh @@ -28,6 +28,7 @@ unset GROFF_ENCODING DOC='.msoquiet nonexistent' OUTPUT=$(echo "$DOC" | "$groff" -Tascii 2>&1) +echo "$OUTPUT" echo "testing that .msoquiet of nonexistent file produces no warning" \ >&2 diff --git a/src/roff/groff/tests/soquiet_works.sh b/src/roff/groff/tests/soquiet_works.sh index 50112cfdc..e2ea28687 100755 --- a/src/roff/groff/tests/soquiet_works.sh +++ b/src/roff/groff/tests/soquiet_works.sh @@ -28,6 +28,7 @@ unset GROFF_ENCODING DOC='.soquiet nonexistent' OUTPUT=$(echo "$DOC" | "$groff" -Tascii 2>&1) +echo "$OUTPUT" echo "testing that .soquiet of nonexistent file produces no error" >&2 test -z "$OUTPUT" diff --git a/tmac/tests/an-ext_MR-works.sh b/tmac/tests/an-ext_MR-works.sh index 471bbf2db..c922ba26f 100755 --- a/tmac/tests/an-ext_MR-works.sh +++ b/tmac/tests/an-ext_MR-works.sh @@ -40,6 +40,7 @@ The real work is done by .MR bar 1 .' output=$(echo "$input" | "$groff" -rmG=0 -Tascii -man -Z | nl) +echo "$output" # Expected: # 88 wf2 diff --git a/tmac/tests/an_MR-works.sh b/tmac/tests/an_MR-works.sh index 56faae69c..3a84e62d3 100755 --- a/tmac/tests/an_MR-works.sh +++ b/tmac/tests/an_MR-works.sh @@ -31,6 +31,7 @@ The real work is done by .MR bar 1 .' OUTPUT=$(echo "$INPUT" | "$groff" -Tascii -rU1 -man -Z | nl) +echo "$OUTPUT" # Expected: # 91 x X tty: link man:bar(1) |