[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep-dir test
From: |
Eli Zaretskii |
Subject: |
grep-dir test |
Date: |
Mon, 19 Dec 2011 19:21:50 +0200 |
The Grep test suite includes the grep-dir test, which does this:
mkdir a || framework_failure
echo x | grep -f a/; { test $? -gt 1 && test $? -lt 128; } || fail=1
echo x | grep -if a/; { test $? -gt 1 && test $? -lt 128; } || fail=1
echo x | grep -Ff a/; { test $? -gt 1 && test $? -lt 128; } || fail=1
echo x | grep -Fif a/; { test $? -gt 1 && test $? -lt 128; } || fail=1
If this is intended to test the behavior with a zero-size input file,
then why does it use an empty directory and not an empty file? Would
using an empty file fail to test some aspect of the Grep behavior?
The problem with "-f a/" is that on some systems (Windows), one cannot
fopen a directory. So this test fails on those systems for no good
reason, AFAICS.
(Please CC me on the responses, as I'm not subscribed to this list.)
TIA
- grep-dir test,
Eli Zaretskii <=
- Re: grep-dir test, Paul Eggert, 2011/12/19
- Re: grep-dir test, Eric Blake, 2011/12/19
- Re: grep-dir test, Eli Zaretskii, 2011/12/19
- Re: grep-dir test, Eric Blake, 2011/12/19
- Re: grep-dir test, Eli Zaretskii, 2011/12/19
- Re: grep-dir test, Eli Zaretskii, 2011/12/20
- Re: grep-dir test, Paolo Bonzini, 2011/12/20
- Re: grep-dir test, Eli Zaretskii, 2011/12/20
- Re: grep-dir test, Paolo Bonzini, 2011/12/20