From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18722 invoked from network); 31 Aug 2004 19:16:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Aug 2004 19:16:08 -0000 Received: (qmail 58903 invoked from network); 31 Aug 2004 19:15:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 19:15:19 -0000 Received: (qmail 13771 invoked by alias); 31 Aug 2004 19:15:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20290 Received: (qmail 13743 invoked from network); 31 Aug 2004 19:15:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Aug 2004 19:15:15 -0000 Received: (qmail 55505 invoked from network); 31 Aug 2004 19:11:39 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 19:11:38 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7VJBWNj047852; Tue, 31 Aug 2004 14:11:32 -0500 (CDT) (envelope-from dan) Date: Tue, 31 Aug 2004 14:11:32 -0500 From: Dan Nelson To: James William Pye Cc: zsh-workers@sunsite.dk Subject: Re: [bug?] test adf -ge 0 Message-ID: <20040831191131.GG33896@dan.emsphone.com> References: <1093976533.69019.10.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093976533.69019.10.camel@localhost> X-OS: FreeBSD 5.3-BETA2 X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 In the last episode (Aug 31), James William Pye said: > Using 4.2.0, why does this return successful? Probably because atoi("sdf") returns 0, so the test succeeds. > Both sh(freebsd) and bash echo an error message and return 2. /bin/sh on Tru64 5.1, AIX 5.2, and Solaris 9 all succeed. > I know zsh is not bash or sh, but this is a fairly serious > inconsistency, IMO. It's probably in the range of "undefined behaviour". I can't find any manpages or standards docs that say that test must verify that numeric arguments are really numbers. -- Dan Nelson dnelson@allantgroup.com