GNU bug report logs - #20130
GNU test behaviour

Previous Next

Package: coreutils;

Reported by: Robson Júnior <robsonjrce <at> gmail.com>

Date: Tue, 17 Mar 2015 21:26:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20130 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Robson Júnior <robsonjrce <at> gmail.com>, 
 20130 <at> debbugs.gnu.org
Subject: Re: bug#20130: GNU test behaviour
Date: Tue, 17 Mar 2015 15:27:02 -0700
On 03/17/2015 02:23 PM, Robson Júnior wrote:
> `test -e` with no filename being passed to. It returns 0, although it 
> should be 1. 

No, 'test -e' should exit with status 0, because '-e' is a nonempty 
string.  In general, 'test X' exits with status 0 if and only if X is 
nonempty.  POSIX requires this behavior; see:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

and search for "1 argument".




This bug report was last modified 10 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.