mirror of
https://https.git.savannah.gnu.org/git/grep.git
synced 2026-01-26 15:39:06 +00:00
* tests/skip-read: Omit duplicates. Reported by Bruno Haible in: https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
24 lines
642 B
Bash
Executable File
24 lines
642 B
Bash
Executable File
#!/bin/sh
|
|
# Check that grep skips reading in some cases.
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
|
|
fail=0
|
|
|
|
echo /dev/null >exp || framework_failure_
|
|
|
|
for opts in '-m0 y' '-f /dev/null' '-v ""'; do
|
|
for matcher in '' -E -F; do
|
|
eval returns_ 1 grep $opts $matcher no-such-file > out || fail=1
|
|
compare /dev/null out || fail=1
|
|
eval returns_ 1 grep -l $opts $matcher /dev/null > out || fail=1
|
|
compare /dev/null out || fail=1
|
|
eval returns_ 1 grep -L $opts $matcher /dev/null > out || fail=1
|
|
compare exp out || fail=1
|
|
eval returns_ 1 grep -L $opts $matcher /dev/null > /dev/null || fail=1
|
|
done
|
|
done
|
|
|
|
|
|
Exit $fail
|