GNU bug report logs - #19658
unportable test(1) comparison operator

Previous Next

Package: emacs;

Reported by: Thomas Klausner <tk <at> giga.or.at>

Date: Thu, 22 Jan 2015 23:11:01 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19658 in the body.
You can then email your comments to 19658 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19658; Package emacs. (Thu, 22 Jan 2015 23:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Klausner <tk <at> giga.or.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 Jan 2015 23:11:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Klausner <tk <at> giga.or.at>
To: bug-gnu-emacs <at> gnu.org
Subject: unportable test(1) comparison operator
Date: Fri, 23 Jan 2015 00:10:07 +0100
[Message part 1 (text/plain, inline)]
Hi!

In emacs git as of yesterday, test/indent/shell.sh contains the
unportable '==' comparison operator for test(1) -- only bash supports
that, not even GNU coreutils' test(1).

Please use '=' instead; see attached patch.

Thanks,
 Thomas

P.S.: I know it's not intended to be executed, but I'd like to avoid
having bad examples around :)
[patch-af (text/plain, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 25 Jan 2015 03:04:02 GMT) Full text and rfc822 format available.

Notification sent to Thomas Klausner <tk <at> giga.or.at>:
bug acknowledged by developer. (Sun, 25 Jan 2015 03:04:03 GMT) Full text and rfc822 format available.

Message #10 received at 19658-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 19658-done <at> debbugs.gnu.org
Subject: Re: unportable test(1) comparison operator
Date: Sat, 24 Jan 2015 19:03:47 -0800
Thanks I changed it to '[ $# -eq 0 ]', which is more portable yet, as it works 
even if a purposely-pedantic shell sets $# to '00'.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 22 Feb 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 121 days ago.

Previous Next


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