zsh-workers
 help / color / mirror / code / Atom feed
* [bug?] test adf -ge 0
@ 2004-08-31 18:22 James William Pye
  2004-08-31 19:11 ` Dan Nelson
  0 siblings, 1 reply; 5+ messages in thread
From: James William Pye @ 2004-08-31 18:22 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

Using 4.2.0, why does this return successful?

Both sh(freebsd) and bash echo an error message and return 2.


> flaw@void:~ % echo $ZSH_VERSION
> 4.2.0
> flaw@void:~ % test sdf -ge 0
> flaw@void:~ % echo $?
> 0
> flaw@void:~ % /bin/sh
> flaw@void $ test sdf -ge 0
> test: sdf: bad number
> flaw@void $ echo $?
> 2
> flaw@void:~ % bash
> bash-2.05b$ test sdf -ge 0
> bash: test: sdf: integer expression expected
> bash-2.05b$ echo $?
> 2

I know zsh is not bash or sh, but this is a fairly serious inconsistency, IMO.

-- 
Regards,
        James William Pye

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 479 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-31 23:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 18:22 [bug?] test adf -ge 0 James William Pye
2004-08-31 19:11 ` Dan Nelson
2004-08-31 20:33   ` DervishD
2004-08-31 21:16     ` Bart Schaefer
2004-08-31 23:21   ` James William Pye

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).