bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep-dir test


From: Eli Zaretskii
Subject: Re: grep-dir test
Date: Tue, 20 Dec 2011 19:39:40 +0200

> Date: Tue, 20 Dec 2011 15:58:40 +0100
> From: Paolo Bonzini <address@hidden>
> 
> >    echo foo | grep -f empty-directory/
> 
> This should be a hard failure.  Asking grep to open a directory and 
> search for patterns in it is wrong.

Well, I agree.  But the test suite doesn't.

> >    echo foo | grep -f empty-file
> 
> This should search for "no pattern", and hence print nothing but still 
> consume the input.

That's what I get.

> So, these should print nothing:
> 
>      echo foo | grep -f /dev/null
>      echo foo | (grep -f /dev/null; cat)
> 
> This should print an error message:
> 
>      echo foo | grep -f /
> 
> This should print an error message followed by "foo":
> 
>      echo foo | (grep -f /; cat)

That's what I get with the native Windows build.

> If you get XPASSes from the last two on Windows, that's good. :)

Indeed, I do.

So it would make sense not to flag it as XPASS, I think.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]