summaryrefslogtreecommitdiff
path: root/tests/find
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2021-11-24 01:57:35 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2021-11-27 23:21:06 +0100
commit4ddb092de66a4186a097de5ab8390b2e7d167efb (patch)
treeac6d9db247cfbd63386d9f7b6f0209a042e5e0fa /tests/find
parentf16272db43c9d811c1b946ec8262651d43619573 (diff)
downloadfindutils-4ddb092de66a4186a097de5ab8390b2e7d167efb.tar.gz
find: allow -files0-from input file to be empty
Do no longer output an error diagnostic when the input file of the -files0-from option is empty. * find/ftsfind.c (process_all_startpoints): Remove error diagnostic. * doc/find.texi (node Starting points): Adjust documentation. * find/find.1: Likewise. * tests/find/files0-from.sh: Adjust test. Suggested by Stephane Chazelas in https://savannah.gnu.org/bugs/?60383#comment11
Diffstat (limited to 'tests/find')
-rwxr-xr-xtests/find/files0-from.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/find/files0-from.sh b/tests/find/files0-from.sh
index bf54a1b2..4864a866 100755
--- a/tests/find/files0-from.sh
+++ b/tests/find/files0-from.sh
@@ -94,19 +94,19 @@ returns_ 1 find -files0-from / > out 2> err \
|| { grep . out err; fail=1; }
# Exercise an empty input file.
-returns_ 1 find -files0-from /dev/null > out 2> err || fail=1
+find -files0-from /dev/null > out 2> err || fail=1
compare /dev/null out || fail=1
-grep 'file with starting points is empty:' err || fail=1
+compare /dev/null err || fail=1
# Likewise via stdin.
-returns_ 1 find -files0-from - < /dev/null > out 2> err || fail=1
+find -files0-from - < /dev/null > out 2> err || fail=1
compare /dev/null out || fail=1
-grep 'file with starting points is empty:.*standard input' err || fail=1
+compare /dev/null err || fail=1
# Likewise via a pipe on stdin.
-cat /dev/null | returns_ 1 find -files0-from - > out 2> err || fail=1
+cat /dev/null | find -files0-from - > out 2> err || fail=1
compare /dev/null out || fail=1
-grep 'file with starting points is empty:.*standard input' err || fail=1
+compare /dev/null err || fail=1
# With the -files0-from option, now a closing paren could be passed as first
# predicate (without, it is treated as a starting point). Ensure that find(1)