[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/16: [troff]: Enhance new tests.
|
From: |
G. Branden Robinson |
|
Subject: |
[groff] 09/16: [troff]: Enhance new tests. |
|
Date: |
Wed, 10 Jan 2024 23:55:04 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit c04df6c2538a67a06b8310eaeb263ba251f56fc5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Jan 8 07:35:26 2024 -0600
[troff]: Enhance new tests.
* src/roff/groff/tests/backslash-exclamation-early-does-not-fail.sh:
* src/roff/groff/tests/output-request-early-does-not-fail.sh: Check that
escape/request parameters don't get emitted before the output leader,
and that they do show up in the output.
---
ChangeLog | 10 ++++++++++
.../groff/tests/backslash-exclamation-early-does-not-fail.sh | 4 ++++
src/roff/groff/tests/output-request-works.sh | 3 +++
3 files changed, 17 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 823983e9a..fcbf260cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-01-08 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff]: Enhance new tests.
+
+ * src/roff/groff/tests/\
+ backslash-exclamation-early-does-not-fail.sh:
+ * src/roff/groff/tests/output-request-early-does-not-fail.sh:
+ Check that escape/request parameters don't get emitted before
+ the output leader, and that they do show up in the output.
+
2024-01-08 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Add tests of early usage of formatter features that
diff --git a/src/roff/groff/tests/backslash-exclamation-early-does-not-fail.sh
b/src/roff/groff/tests/backslash-exclamation-early-does-not-fail.sh
index 7dcf20b75..eb29d44ca 100755
--- a/src/roff/groff/tests/backslash-exclamation-early-does-not-fail.sh
+++ b/src/roff/groff/tests/backslash-exclamation-early-does-not-fail.sh
@@ -33,6 +33,10 @@ do
echo "checking early backslash-? escape on $device device" >&2
output=$(printf '\\!cA\n' "$input" | "$groff" -T $device -Z) || wail
echo "$output"
+ echo "checking that leader starts on line 1 for $device device" >&2
+ echo "$output" | sed -n '1p' | grep -Eq '^x *T' || wail
+ echo "checking that expected output is present for $device device" >&2
+ echo "$output" | grep -Eq 'c *A' || wail
done
test -z "$fail"
diff --git a/src/roff/groff/tests/output-request-works.sh
b/src/roff/groff/tests/output-request-works.sh
index 4b197f0e9..e1070bc11 100755
--- a/src/roff/groff/tests/output-request-works.sh
+++ b/src/roff/groff/tests/output-request-works.sh
@@ -43,6 +43,9 @@ do
|| wail
echo "$output"
+ echo "checking that leader starts on line 1 for $device device" >&2
+ echo "$output" | sed -n '1p' | grep -Eq '^x *T' || wail
+
echo "checking simple 'output' request on $device device" >&2
output=$(printf "%s\n" "$input_simple" | "$groff" -T $device -Z) \
|| wail
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/16: [troff]: Enhance new tests.,
G. Branden Robinson <=