gbranden pushed a commit to branch master
in repository groff.
commit 8ef4d5c5c9dd081576ecfaeb42fd101e1757b520
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 21 09:03:50 2022 -0500
[tests]: Improve preconv /dev/stdin robustness.
* src/preproc/preconv/tests/do-not-seek-the-unseekable.sh: Skip a check
if /dev/stdin is not a character special device.
---
ChangeLog | 5 +++++
src/preproc/preconv/tests/do-not-seek-the-unseekable.sh | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 48c8e840..dba981d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-21 G. Branden Robinson <[email protected]>
+
+ * src/preproc/preconv/tests/do-not-seek-the-unseekable.sh: Skip
+ a check if /dev/stdin is not a character special device.
+
2022-05-21 G. Branden Robinson <[email protected]>
* m4/groff.m4 (GROFF_PDFTOOLS): Rename this...
diff --git a/src/preproc/preconv/tests/do-not-seek-the-unseekable.sh
b/src/preproc/preconv/tests/do-not-seek-the-unseekable.sh
index bf25b060..3cb36404 100755
--- a/src/preproc/preconv/tests/do-not-seek-the-unseekable.sh
+++ b/src/preproc/preconv/tests/do-not-seek-the-unseekable.sh
@@ -39,6 +39,11 @@ echo "testing seekability of file operand '-'" >&2
output=$(printf '' | "$preconv" -d - 2>&1)
echo "$output" | grep -q "stream is not seekable" || wail
+# /dev/stdin might not exist in a chroot. Or, if it's not (a symbolic
+# link to) a character special device, the next test will not be valid.
+test -z "$fail"
+test -c /dev/stdin || exit 77 # skip
+
echo "testing seekability of standard input stream" >&2
output=$(printf '' | "$preconv" -d /dev/stdin 2>&1)
echo "$output" | grep -q "stream is not seekable" || wail
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit