[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/04: Tweak test cases.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/04: Tweak test cases. |
Date: |
Sun, 12 Apr 2020 12:22:16 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 71062c4fbfeec6462b68bde1458c81f70e8c2467
Author: G. Branden Robinson <address@hidden>
AuthorDate: Sun Apr 12 22:02:38 2020 +1000
Tweak test cases.
* src/roff/groff/tests/regression_savannah_58153.sh:
* src/roff/groff/tests/\
use_point_size_escape_with_single_digit_arg.sh: Use "set -e" to ensure
that multi-test script files don't hide problems. There are arguments
against "set -e" (and you can ask Greg Wooledge for all of them), but
I'm so used to it from years of writing Debian package maintainer
scripts that I feel comfortable with it. It is less verbose than
several alternatives (especially having one test script per case).
* src/roff/groff/tests/string_case_xform_unicode_escape.sh: Update with
respect to new failure output (in a comment only, since this is an
XFAIL test).
* tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh: Drop
unnecessary "|| exit 1" from end of script. Incidentally, this script
illustrates an alternative to "set -e".
Also fix some test case text.
---
ChangeLog | 20 ++++++++++++++++++++
src/roff/groff/tests/regression_savannah_58153.sh | 2 ++
.../groff/tests/string_case_xform_unicode_escape.sh | 5 +++--
.../use_point_size_escape_with_single_digit_arg.sh | 2 ++
.../an-old_AT_and_UC_footer_saved_and_restored.sh | 4 ++--
5 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index eb2b96d..98ae960 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2020-04-12 G. Branden Robinson <address@hidden>
+
+ * src/roff/groff/tests/regression_savannah_58153.sh:
+ * src/roff/groff/tests/\
+ use_point_size_escape_with_single_digit_arg.sh: Use "set -e" to
+ ensure that multi-test script files don't hide problems. There
+ are arguments against "set -e" (and you can ask Greg Wooledge
+ for all of them), but I'm so used to it from years of writing
+ Debian package maintainer scripts that I feel comfortable with
+ it. It is less verbose than several alternatives (especially
+ having one test script per case).
+
+ * src/roff/groff/tests/string_case_xform_unicode_escape.sh:
+ Update with respect to new failure output (in a comment only,
+ since this is an XFAIL test).
+
+ * tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh:
+ Drop unnecessary "|| exit 1" from end of script. Incidentally,
+ this script illustrates an alternative to "set -e".
+
2020-04-11 G. Branden Robinson <address@hidden>
Rework documentation of .spreadwarn.
diff --git a/src/roff/groff/tests/regression_savannah_58153.sh
b/src/roff/groff/tests/regression_savannah_58153.sh
index a12d86e..0c48bd5 100755
--- a/src/roff/groff/tests/regression_savannah_58153.sh
+++ b/src/roff/groff/tests/regression_savannah_58153.sh
@@ -26,5 +26,7 @@ OUT=$("$groff" -U 2>&1 >/dev/null <<EOF
EOF
)
+set -e
+
printf "%s\n" "$OUT" | grep -qw 'backtrace: pipe'
printf "%s\n" "$OUT" | grep -qw 'backtrace: file'
diff --git a/src/roff/groff/tests/string_case_xform_unicode_escape.sh
b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
index 8f9e390..d1b3db1 100755
--- a/src/roff/groff/tests/string_case_xform_unicode_escape.sh
+++ b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
@@ -25,9 +25,10 @@ groff="${abs_top_builddir:-.}/test-groff"
expected="attaché ATTACHÉ"
# For now, we expect problems like this:
-# <standard input>:4: backtrace: string 'attache'
+# troff: backtrace: '<standard input>':4: string 'attache'
+# troff: backtrace: file '<standard input>':5
# troff: <standard input>:5: warning: can't find special character
-# 'U0065_0301'
+# 'U0065_0301'
actual=$("$groff" -Tutf8 2>&1 > /dev/null <<EOF
.pl 1v
diff --git
a/src/roff/groff/tests/use_point_size_escape_with_single_digit_arg.sh
b/src/roff/groff/tests/use_point_size_escape_with_single_digit_arg.sh
index b80a102..9c032b4 100755
--- a/src/roff/groff/tests/use_point_size_escape_with_single_digit_arg.sh
+++ b/src/roff/groff/tests/use_point_size_escape_with_single_digit_arg.sh
@@ -26,6 +26,8 @@ groff="${abs_top_builddir:-.}/test-groff"
DOC=".vs 10v
\s36A"
+set -e
+
# Verify that the idiosyncratic behavior of \sN is supported in
# compatibility mode...
echo "testing \s36A in compatiblity mode (36-point 'A')" >&2
diff --git a/tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh
b/tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh
index 6d02f9d..dfcd79d 100755
--- a/tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh
+++ b/tmac/tests/an-old_AT_and_UC_footer_saved_and_restored.sh
@@ -38,7 +38,7 @@ fsf \- liberate laser printer firmware'
EXAMPLE_WFJ_PAGE='.TH wfj 1 2020-01-16 "groff test suite"
.UC
.SH Name
-knb \- call 1-800-ITS-UNIX'
+wfj \- call 1-800-ITS-UNIX'
EXAMPLE_GNU_PAGE='.TH gnu 1 2020-01-16 "groff test suite"
.SH Name
@@ -100,6 +100,6 @@ then
echo "2nd GNU test failed" >&2
fi
-test -z "$FAIL" || exit 1
+test -z "$FAIL"
# vim:set ai et sw=4 ts=4 tw=80:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/04: Tweak test cases.,
G. Branden Robinson <=