[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 19/46: [man]: Update test coverage and expectations.
From: |
G. Branden Robinson |
Subject: |
[groff] 19/46: [man]: Update test coverage and expectations. |
Date: |
Wed, 7 Dec 2022 04:32:34 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 7303c210607f08bc8f7967c1a4c42cff35932bec
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 3 04:43:10 2022 -0600
[man]: Update test coverage and expectations.
* tmac/tests/an_ME-punct-hyphenates.sh: Test both "an.tmac" and
"an-ext.tmac" implementations of `ME`.
* tmac/tests/an_UE-punct-hyphenates.sh: Test both "an.tmac" and
"an-ext.tmac" implementations of `UE`.
* tmac/tests/an_UE-breaks-before-long-URIs.sh: Update test expectations.
I appear to have inadvertently fixed some inelegant rendering.
---
ChangeLog | 12 ++++++++++++
tmac/tests/an_ME-punct-hyphenates.sh | 25 +++++++++++++++++++++----
tmac/tests/an_UE-breaks-before-long-URIs.sh | 13 +++++++------
tmac/tests/an_UE-punct-hyphenates.sh | 25 +++++++++++++++++++++----
4 files changed, 61 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 422d5e45a..6ccb45fc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-12-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [man]: Update test coverage and expectations.
+
+ * tmac/tests/an_ME-punct-hyphenates.sh: Test both "an.tmac" and
+ "an-ext.tmac" implementations of `ME`.
+ * tmac/tests/an_UE-punct-hyphenates.sh: Test both "an.tmac" and
+ "an-ext.tmac" implementations of `UE`.
+ * tmac/tests/an_UE-breaks-before-long-URIs.sh: Update test
+ expectations. I appear to have inadvertently fixed some
+ inelegant rendering.
+
2022-12-02 G. Branden Robinson <g.branden.robinson@gmail.com>
[tests]: Rename to reflect code reorganization.
diff --git a/tmac/tests/an_ME-punct-hyphenates.sh
b/tmac/tests/an_ME-punct-hyphenates.sh
index 17a0ecc84..1274c46c4 100755
--- a/tmac/tests/an_ME-punct-hyphenates.sh
+++ b/tmac/tests/an_ME-punct-hyphenates.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2020 Free Software Foundation, Inc.
+# Copyright (C) 2020, 2022 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -20,7 +20,14 @@
groff="${abs_top_builddir:-.}/test-groff"
-EXAMPLE='.TH me\-punct 1 2020-08-15 "groff test suite"
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+input='.TH me\-punct 1 2020-08-15 "groff test suite"
.SH Name
me\-punct \- mailto: trailing material is subject to hyphenation
.SH Description
@@ -32,7 +39,17 @@ hyphenate a ridiculous word* without machine assistance
# Turn off break warnings; we expect an adjustment problem.
# I kind of wish adjustment warnings were a different category from
# break warnings.
-printf "%s\n" "$EXAMPLE" | "$groff" -Tascii -Wbreak -P-cbou -man \
- | grep -qE 'pn.*-'
+echo "testing hyphenation of trailing text by an.tmac's ME macro"
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -Wbreak -P-cbou -man)
+echo "$output"
+echo "$output" | grep -qE 'pn.*-'
+
+echo "testing hyphenation of trailing text by an-ext.tmac's ME macro"
+output=$(printf "%s\n" "$input" \
+ | "$groff" -rmG=0 -Tascii -Wbreak -P-cbou -man)
+echo "$output"
+echo "$output" | grep -qE 'pn.*-'
+
+test -z "$fail"
# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tests/an_UE-breaks-before-long-URIs.sh
b/tmac/tests/an_UE-breaks-before-long-URIs.sh
index af2e2640f..0b151fd8d 100755
--- a/tmac/tests/an_UE-breaks-before-long-URIs.sh
+++ b/tmac/tests/an_UE-breaks-before-long-URIs.sh
@@ -48,15 +48,16 @@ wail () {
fail=yes
}
-echo "testing that no diagnostic messages are produced" >&2
-output=$(printf "%s" "$input" \
+output=$(printf "%s" "$input" | "$groff" -Tascii -P-cbou -man)
+echo "$output"
+error=$(printf "%s" "$input" \
| "$groff" -Tascii -P-cbou -man -ww -z 2>&1)
-test -z "$output" || wail
+echo "testing that no diagnostic messages are produced" >&2
+test -z "$error" || wail
echo "testing that lines break where expected" >&2
-output=$(printf "%s" "$input" | "$groff" -Tascii -P-cbou -man)
-break1=$(echo "$output" | grep -x " *Commerce")
-break2=$(echo "$output" | grep -x " *<https.*actionscript/")
+break1=$(echo "$output" | grep -x " *Commerce *<https.*devnet/")
+break2=$(echo "$output" | grep -x " *actionscript/.* transaction *in")
break3=$(echo "$output" | grep -x " *<https.*612")
test -n "$break1" || wail "first break"
test -n "$break2" || wail "second break"
diff --git a/tmac/tests/an_UE-punct-hyphenates.sh
b/tmac/tests/an_UE-punct-hyphenates.sh
index 86a541299..e438078e5 100755
--- a/tmac/tests/an_UE-punct-hyphenates.sh
+++ b/tmac/tests/an_UE-punct-hyphenates.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2020 Free Software Foundation, Inc.
+# Copyright (C) 2020, 2022 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -20,7 +20,14 @@
groff="${abs_top_builddir:-.}/test-groff"
-EXAMPLE='.TH ue\-punct 1 2020-08-15 "groff test suite"
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+input='.TH ue\-punct 1 2020-08-15 "groff test suite"
.SH Name
ue\-punct \- URL trailing material is subject to hyphenation
.SH Description
@@ -30,7 +37,17 @@ hyphenate a ridiculous word* without machine assistance
.UE (*pneumonoultramicroscopicsilicovolcanoconiosis).'
# Turn off break warnings; we expect an adjustment problem.
-printf "%s\n" "$EXAMPLE" | "$groff" -Tascii -Wbreak -P-cbou -man \
- | grep -qE 'pn.*-'
+echo "testing hyphenation of trailing text by an.tmac's UE macro"
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -Wbreak -P-cbou -man)
+echo "$output"
+echo "$output" | grep -qE 'pn.*-'
+
+echo "testing hyphenation of trailing text by an-ext.tmac's UE macro"
+output=$(printf "%s\n" "$input" \
+ | "$groff" -rmG=0 -Tascii -Wbreak -P-cbou -man)
+echo "$output"
+echo "$output" | grep -qE 'pn.*-'
+
+test -z "$fail"
# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 19/46: [man]: Update test coverage and expectations.,
G. Branden Robinson <=