[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/12: [groff]: Regression-test Savannah #66587.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/12: [groff]: Regression-test Savannah #66587. |
Date: |
Thu, 19 Dec 2024 15:21:30 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 3f783091f042d808b9d37156e245594a1f7e6a50
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Dec 19 13:30:57 2024 -0600
[groff]: Regression-test Savannah #66587.
* src/roff/groff/tests/using-diversion-as-character-works.sh:
* src/roff/groff/tests/artifacts/small-gnu-head.sh: Add test and its
input artifact.
* src/roff/groff/groff.am (groff_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 9 ++++
src/roff/groff/groff.am | 1 +
src/roff/groff/tests/artifacts/small-gnu-head.sh | Bin 0 -> 791 bytes
.../tests/using-diversion-as-character-works.sh | 53 +++++++++++++++++++++
4 files changed, 63 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index d81f63338..d4eef4d05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-12-19 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [groff]: Regression-test Savannah #66587.
+
+ * src/roff/groff/tests/using-diversion-as-character-works.sh:
+ * src/roff/groff/tests/artifacts/small-gnu-head.sh: Add test and
+ its input artifact.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2024-12-12 Deri James <deri@chuzzlewit.myzen.co.uk>
Expose more attributes of pdfnotes
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 27e1809cf..7ba459f2b 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -100,6 +100,7 @@ groff_TESTS = \
src/roff/groff/tests/substring-request-works.sh \
src/roff/groff/tests/sy-request-works.sh \
src/roff/groff/tests/unencodable-things-in-grout.sh \
+ src/roff/groff/tests/using-diversion-as-character-works.sh \
src/roff/groff/tests/write-request-handles-empty-second-arg.sh
TESTS += $(groff_TESTS)
EXTRA_DIST += $(groff_TESTS)
diff --git a/src/roff/groff/tests/artifacts/small-gnu-head.sh
b/src/roff/groff/tests/artifacts/small-gnu-head.sh
new file mode 100644
index 000000000..dedfcb8ae
Binary files /dev/null and b/src/roff/groff/tests/artifacts/small-gnu-head.sh
differ
diff --git a/src/roff/groff/tests/using-diversion-as-character-works.sh
b/src/roff/groff/tests/using-diversion-as-character-works.sh
new file mode 100755
index 000000000..3e8e4b3c4
--- /dev/null
+++ b/src/roff/groff/tests/using-diversion-as-character-works.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #6XXXX. Based on a reproducer by Peter
+# Schaffter.
+
+input='.
+.sp 6P-1v
+.
+.nr img-w 25p
+.nr img-d 22p
+.
+.di img-div
+.ev img-div
+.nf
+\X@pdf: pdfpic artifacts/GNU_head_small.pdf@
+.ev
+.di
+.
+.char \[img] \*[img-div]
+.ds gnu \v@-\n[img-d]u@\[img]\h@\n[img-w]u@
+.
+.nop A GNU head \*[gnu] image.
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -T pdf -Z)
+echo "$output"
+
+# We should observe a horizontal motion after the word "head" and before
+# the device extension command.
+stream=$(echo "$output" | tr '\n' ' ')
+echo "$stream" | grep -Eq 't *head +w *h *2500 +V *62000 +x * X *pdf:'
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/12: [groff]: Regression-test Savannah #66587.,
G. Branden Robinson <=