From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15 invoked from network); 31 Aug 2004 23:21:19 -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 23:21:19 -0000 Received: (qmail 18797 invoked from network); 31 Aug 2004 23:21:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 23:21:13 -0000 Received: (qmail 17534 invoked by alias); 31 Aug 2004 23:21:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20293 Received: (qmail 17521 invoked from network); 31 Aug 2004 23:21:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Aug 2004 23:21:09 -0000 Received: (qmail 18528 invoked from network); 31 Aug 2004 23:21:09 -0000 Received: from rhid.com (200.46.204.134) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 23:21:08 -0000 Received: from [127.0.0.1] (rhid.com [200.46.204.134]) by rhid.com (Postfix) with ESMTP id DEECCF83831; Tue, 31 Aug 2004 23:21:01 +0000 (GMT) Subject: Re: [bug?] test adf -ge 0 From: James William Pye To: Dan Nelson Cc: zsh-workers@sunsite.dk In-Reply-To: <20040831191131.GG33896@dan.emsphone.com> References: <1093976533.69019.10.camel@localhost> <20040831191131.GG33896@dan.emsphone.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-cY5UNipALCmV06XCIXWe" Organization: rhid development Message-Id: <1093994468.69019.184.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 31 Aug 2004 16:21:08 -0700 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 --=-cY5UNipALCmV06XCIXWe Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2004-08-31 at 12:11, Dan Nelson wrote: > Probably because atoi("sdf") returns 0, so the test succeeds. Indeed, without errno being set too, as you are probably aware. FreeBSD(likely, NetBSD as well) uses strtol, which is how they catch the error. > /bin/sh on Tru64 5.1, AIX 5.2, and Solaris 9 all succeed. Wow, just when I thought I was writing portable scripts! /; > 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. I looked at what OpenGroup.org had, but nothing regarding the subject seemed to be specified. http://www.opengroup.org/onlinepubs/009695399/utilities/test.html This doesn't match up to the version FreeBSD's test is said to comply to, so I don't know for sure if FreeBSD's test is complying specified behaviour or just historic on BSDs. =3D\ --=20 Regards, James William Pye --=-cY5UNipALCmV06XCIXWe Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iQEVAwUAQTUH5KZpiPNPvu8yAQIp3wgAiqkTv3g68tgGckbmjKRDu1iGkqop9gMu 9TLrOgWcv1PXohdONy25CsnqOk0zjYhkuZwKpGR9AQuwYUGHXpX468f1DlRgbCL9 ZTohG0ncK7V+cQYWzgzh09HPrNWcWpVbg8wULqhkUNoZqYaVQLGgWE8oTZVXJT8J Sm9BRCtpiXrLLesfRAc9/g4/CF5aQuQ3O+ZgCEXcp0BDUbR+uPIchhq7Mwpr5Nnk nFNc7M9mHcboNlGjDZuFN//WxgdDz/uWXyYUPYfNFkbAlgGNQQRZPIQYF7U4nJa2 V5fPBpFj4pmFABrRhNVWHs5q1gYG9usH3JeDKyOaTwqltlWM6IRWMg== =a7Ji -----END PGP SIGNATURE----- --=-cY5UNipALCmV06XCIXWe--