[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 48/50: [tests]: Improve preconv /dev/stdin robustness.
From: |
G. Branden Robinson |
Subject: |
[groff] 48/50: [tests]: Improve preconv /dev/stdin robustness. |
Date: |
Sat, 21 May 2022 12:17:31 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 8ef4d5c5c9dd081576ecfaeb42fd101e1757b520
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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 <g.branden.robinson@gmail.com>
+
+ * 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 <g.branden.robinson@gmail.com>
* 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 48/50: [tests]: Improve preconv /dev/stdin robustness.,
G. Branden Robinson <=