diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
commit | 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch) | |
tree | 63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /src/grep/tests/skip-read | |
parent | Initial commit. (diff) | |
download | kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.tar.xz kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.zip |
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/grep/tests/skip-read')
-rwxr-xr-x | src/grep/tests/skip-read | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/grep/tests/skip-read b/src/grep/tests/skip-read new file mode 100755 index 0000000..1e9e718 --- /dev/null +++ b/src/grep/tests/skip-read @@ -0,0 +1,25 @@ +#!/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 + for file in /dev/null no-such-file; 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 + done + 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 |