From: Dan Nelson <dnelson@allantgroup.com>
To: James William Pye <flaw@rhid.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: [bug?] test adf -ge 0
Date: Tue, 31 Aug 2004 14:11:32 -0500 [thread overview]
Message-ID: <20040831191131.GG33896@dan.emsphone.com> (raw)
In-Reply-To: <1093976533.69019.10.camel@localhost>
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
next prev parent reply other threads:[~2004-08-31 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 18:22 James William Pye
2004-08-31 19:11 ` Dan Nelson [this message]
2004-08-31 20:33 ` DervishD
2004-08-31 21:16 ` Bart Schaefer
2004-08-31 23:21 ` James William Pye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040831191131.GG33896@dan.emsphone.com \
--to=dnelson@allantgroup.com \
--cc=flaw@rhid.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).