GNU bug report logs - #24894
coreutils 8.4 : `test -s` without argument does not return an error

Previous Next

Package: coreutils;

Reported by: BAECKEROOT Alain <alain.baeckeroot <at> carsat-sudest.fr>

Date: Mon, 7 Nov 2016 16:34: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 #15 received at 24894 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: BAECKEROOT Alain <alain.baeckeroot <at> carsat-sudest.fr>, 24894 <at> debbugs.gnu.org
Subject: Re: bug#24894: coreutils 8.4 : `test -s` without argument does not
 return an error
Date: Mon, 7 Nov 2016 16:51:33 +0000
On 07/11/16 12:58, BAECKEROOT Alain wrote:
> Dear gnu-coreutils team
> 
> We had a funny problem caused by `test` which does return "0" when an option is given without any EXPRESSION 
> 
> The man page says (near line 15 or so) : 
>       An  omitted  EXPRESSION defaults to false.

It's a bit of a gotcha, but not a bug. I updated:
http://www.pixelbeat.org/docs/coreutils-gotchas.html#test

thanks,
Pádraig




This bug report was last modified 8 years and 200 days ago.

Previous Next


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