[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 22/24: [groff]: Regression-test Savannah #66512.
From: |
G. Branden Robinson |
Subject: |
[groff] 22/24: [groff]: Regression-test Savannah #66512. |
Date: |
Mon, 2 Dec 2024 22:52:31 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit ced728d5378c4be50f1d5874110cce8308c00d1d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Dec 2 20:11:50 2024 -0600
[groff]: Regression-test Savannah #66512.
* src/roff/groff/tests/pi-request-works.sh:
* src/roff/groff/tests/sy-request-works.sh: Add check of `tm` output to
standard error stream immediately after request.
Tests fail at this commit.
---
ChangeLog | 8 ++++++++
src/roff/groff/tests/pi-request-works.sh | 17 ++++++++++++++++-
src/roff/groff/tests/sy-request-works.sh | 17 ++++++++++++++++-
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f081c6027..aef9f1fd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-12-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [groff]: Regression-test Savannah #66512.
+
+ * src/roff/groff/tests/pi-request-works.sh:
+ * src/roff/groff/tests/sy-request-works.sh: Add check of `tm`
+ output to standard error stream immediately after request.
+
2024-12-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/devices/xditview/xditview.c (Syntax): Align wording of
diff --git a/src/roff/groff/tests/pi-request-works.sh
b/src/roff/groff/tests/pi-request-works.sh
index ac85e4eaf..52ff1ff7f 100755
--- a/src/roff/groff/tests/pi-request-works.sh
+++ b/src/roff/groff/tests/pi-request-works.sh
@@ -20,9 +20,24 @@
groff="${abs_top_builddir:-.}/test-groff"
-#echo "checking that 'pi' request works" >&2
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+echo "checking that 'pi' request works" >&2
output=$(printf '.pi sed s/^/#/\nhello\n' | "$groff" -UZ)
echo "$output"
echo "$output" | grep -Eqx '^#t *hello'
+echo "checking that parser returns to correct state after 'pi'" >&2
+output=$(printf '.pi cat\n.tm goodbye\n' \
+ | "$groff" -UZ 2>&1 > /dev/null)
+echo $output
+echo $output | grep -Fqx goodbye || wail
+
+test -z "$fail"
+
# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
diff --git a/src/roff/groff/tests/sy-request-works.sh
b/src/roff/groff/tests/sy-request-works.sh
index a4caebfe1..4780e9514 100755
--- a/src/roff/groff/tests/sy-request-works.sh
+++ b/src/roff/groff/tests/sy-request-works.sh
@@ -20,9 +20,24 @@
groff="${abs_top_builddir:-.}/test-groff"
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
echo "checking that 'sy' request works" >&2
output=$(printf '.sy echo hello\n' | "$groff" -Uz)
echo $output
-echo $output | grep -Fqx hello
+echo $output | grep -Fqx hello || wail
+
+echo "checking that parser returns to correct state after 'sy'" >&2
+output=$(printf '.sy echo hello\n.tm goodbye\n' \
+ | "$groff" -Uz 2>&1 > /dev/null)
+echo $output
+echo $output | grep -Fqx goodbye || wail
+
+test -z "$fail"
# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 22/24: [groff]: Regression-test Savannah #66512.,
G. Branden Robinson <=